* {
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  background: #ffffff; 
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.container {
  width: 400px;
  position: relative;
}

.card-box {
  perspective: 1000px;
  margin-bottom: 60px;
}

.card-inner {
  width: 100%;
  height: 220px;
  position: relative;
  transform-style: preserve-3d;
  transition: 0.8s;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}

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


.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 15px;
  color: white;
  padding: 20px;
  backface-visibility: hidden;
  box-shadow: inset 0 0 40px rgba(255, 255, 255, 0.1);
  animation: smoothGradient 12s ease infinite;
  background-size: 600% 600%;
}

.card-front {
  background-image: linear-gradient(270deg, #0055ff, #4b0082, #8a2be2, #001f3f);
}
.card-back {
  background-image: linear-gradient(270deg, #4b0082, #8a2be2, #001f3f, #0055ff);
  transform: rotateY(180deg);
  position: relative;
}

.card-back::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  height: 45px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  pointer-events: none;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

@keyframes smoothGradient {
  0% {
    background-position: 0% 50%;
  }
  25% {
    background-position: 50% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  75% {
    background-position: 50% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.card-logo {
  width: 60px;
  position: absolute;
  top: 20px;
  right: 20px;
}
.card-chip {
  width: 50px;
  height: 35px;
  background: gold;
  border-radius: 6px;
  margin-bottom: 30px;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.7);
}
.card-number {
  font-size: 21px;
  letter-spacing: 2.5px;
  margin-bottom: 35px;
  transition: 0.3s;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.25);
}
.card-footer {
  display: flex;
  justify-content: space-between;
}
.card-footer span {
  font-size: 10px;
  opacity: 0.8;
  text-shadow: 0 0 4px rgba(255, 255, 255, 0.15);
}
.black-line {
  height: 40px;
  background: #000;
  margin-top: 20px;
  border-radius: 5px;
  box-shadow: inset 0 2px 10px rgba(255, 255, 255, 0.1);
}
.cvv-box {
  margin-top: 30px;
  text-align: right;
}
.cvv-box p {
  background: #f5f5f5;
  color: #111;
  border-radius: 15px;
  padding: 12px 20px;
  width: 100%;
  max-width: 360px;
  box-sizing: border-box;
  font-weight: 700;
  letter-spacing: 4px;
  margin-top: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
  text-align: right;
  user-select: none;
  border: none;
  position: relative;
  z-index: 1;
}

.card-form {
  background: #fff;
  padding: 20px;
  margin-top: -20px;
  border-radius: 15px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}
.card-form input,
.card-form select {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border-radius: 6px;
  border: 1.5px solid #ccc;
  transition: border-color 0.3s;
}
.card-form input:focus,
.card-form select:focus {
  border-color: #4b0082;
  outline: none;
  box-shadow: 0 0 8px #4b0082;
}
.row {
  display: flex;
  gap: 10px;
}
button {
  width: 100%;
  padding: 12px;
  border: none;
  background: #4b0082;
  color: #fff;
  cursor: pointer;
  border-radius: 8px;
  font-weight: bold;
  transition: background-color 0.3s;
}
button:hover {
  background: #001f3f;
}

.card-front::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 15px;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.15),
    transparent
  );
  animation: shine 3s infinite;
}
@keyframes shine {
  0% {
    transform: translateX(-100%);
  }
  50% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.highlight-box {
  position: absolute;
  border: 2px solid #fff;
  border-radius: 8px;
  pointer-events: none;
  transition: all 0.4s ease;
  box-sizing: border-box;
  z-index: 15;
  mix-blend-mode: screen;
  filter: drop-shadow(0 0 5px white);
  opacity: 0;
}
