#skills {
  background: linear-gradient(130deg, #132039, #1A315C, #15474f, #1A535C);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;  
}

.flip-card {
  background-color: transparent;
  width: 700px;   
  height: 500px; 
  perspective: 1500px;
  position: relative;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.flip-card.is-flipped .flip-card-inner {
  transform: rotateY(180deg);
}

.panel {
  background: #ddd;
  border-radius: 10px;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 40px 80px;
  box-sizing: border-box;
}

.flip-card-back {
  transform: rotateY(180deg);
}

.panel-title {
  color: #fff;
  padding: 8px 35px;
  border-radius: 25px;
  font-family: 'Pixelify Sans', sans-serif;
  font-size: 36px;
  margin-bottom: 20px;
}

.panel-title.dev {
  background: linear-gradient(90deg, #1A535C, #246670);
}

.panel-title.tools {
  background: linear-gradient(90deg, #1A315C, #294881);
}

.card-grid {
  display: grid;
  grid-gap: 30px;
  justify-content: center;
  align-content: start;
  flex-grow: 1;
  margin-top: 30px;
  margin-bottom: auto;
}

.dev-grid {
  grid-template-columns: repeat(5, 100px);
}

.tools-grid {
  grid-template-columns: repeat(5, 100px);
}

.card-box img {
  width: 50px;
  height: auto;
  display: block;
}

.card-box {
  width: 100px;
  height: 100px;
  background: linear-gradient(90deg, #1A535C, #246670);
  border-radius: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.flip-card-back .card-box {
  background: linear-gradient(90deg, #1A315C, #294881);
}

.card-box:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.card-box i {
  font-size: 48px;
  color: #fff;
  display: block;
  text-align: center;
  line-height: 1;
}

.arrow-button {
  position: absolute;
  bottom: 20px;
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  cursor: pointer;
}

.arrow-button svg {
  width: 30px;
  height: 30px;
  display: block;
  margin: auto;
}

.arrow-button.dev {
  background: linear-gradient(90deg, #1A535C, #246670);
}

.arrow-button.tools {
  background: linear-gradient(90deg, #1A315C, #294881);
}

.arrow-button:hover {
  opacity: 0.85;
}

@media (max-width: 768px) {
  #skills {
    padding: 20px;
    max-height: 60vh;
  }

   .skills-wrapper {
    transform: scale(1.1);      
    transform-origin: center;
  }

  .flip-card {
    width: 250px;
    height: 220px;
  }

  .panel {
    padding: 20px 20px 40px;
  }

  .panel-title {
    font-size: 18px;
    padding: 4px 18px;
    margin-bottom: 10px;
  }

  .card-grid {
    grid-gap: 4px;
    margin-top: 15px;
  }

  .dev-grid,
  .tools-grid {
    grid-template-columns: repeat(5, 40px);
  }

  .card-box {
    width: 40px;
    height: 40px;
  }

  .card-box i {
    font-size: 18px;
  }

  .card-box img {
    width: 18px;
  }

  .arrow-button {
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    bottom: 20px;
  }

  .arrow-button svg {
    width: 16px;
    height: 16px;
  }
}
