body {
  margin: 0;
  overflow: hidden;
  min-height: 100vh;
  background: radial-gradient(circle at top center, rgba(255,255,255,0.14), transparent 25%),
              linear-gradient(180deg, #06131f 0%, #08070e 35%, #12020f 100%);
  color: white;
  font-family: Arial, sans-serif;
  cursor: pointer;
  position: relative;
}

body::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 15%, rgba(255,255,255,0.08), transparent 22%),
              radial-gradient(circle at 20% 10%, rgba(255,255,255,0.06), transparent 16%),
              radial-gradient(circle at 80% 12%, rgba(255,255,255,0.05), transparent 18%);
  pointer-events: none;
  z-index: 0;
}

/* CORTINAS */
.curtain {
  position: absolute;
  width: 100%;
  height: 100%;
  background: url("assets/curtain.jpg") center/cover no-repeat;
  top: 0;
  left: 0;
  z-index: 100;
  transition: transform 2s ease;
}

.left {
  clip-path: inset(0 50% 0 0);
}

.right {
  clip-path: inset(0 0 0 50%);
}

.open .left {
  transform: translateX(-100%);
}

.open .right {
  transform: translateX(100%);
}


/* TÍTULO */
.logo {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
}

.logo img {
  width: 100%;
  max-width: 100%;
  display: block;
}

.title {
  position: absolute;
  color: white;
  font-size: 38px;
  top: 12%;
  width: 100%;
  text-align: center;
  opacity: 0;
  transition: opacity 2s;
}

.open .title {
  opacity: 1;
}

/* GRID */
.grid {
  position: absolute;
  top: 28%;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, 920px);
  padding: 28px 24px 32px;
  display: grid;
  grid-template-columns: repeat(4, minmax(100px, 1fr));
  gap: 20px;
  z-index: 2;
  transition: opacity 1s ease;
  opacity: 0;
  justify-content: center;
  margin: 0 auto;
  background: rgba(8, 7, 18, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  box-shadow: 0 0 80px rgba(255, 0, 0, 0.16), inset 0 0 30px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(14px);
}

.open .grid {
  opacity: 1;
}

.grid::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -24px;
  transform: translateX(-50%);
  width: calc(100% - 60px);
  height: 10px;
  background: linear-gradient(90deg, transparent, rgba(255, 80, 80, 0.7), transparent);
  filter: blur(8px);
}

/* CARD */
.card {
  width: 120px;
  height: 120px;
  background: rgba(8, 8, 14, 0.95);
  color: #fff;
  font-size: 40px;
  font-weight: 700;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 2px solid rgba(255, 77, 94, 0.9);
  border-radius: 18px;
  cursor: pointer;
  transition: transform 0.35s ease, background 0.35s ease, box-shadow 0.35s ease, width 0.35s ease, height 0.35s ease, top 0.35s ease, left 0.35s ease;
  transform-style: preserve-3d;
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.16), inset 0 0 12px rgba(255, 255, 255, 0.06);
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.25);
  position: relative;
}

.card .card-inner {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.card .card-actions {
  display: none;
  gap: 12px;
  flex-direction: column;
  width: 100%;
  align-items: center;
}

.card.active {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 580px;
  height: 420px;
  transform: translate(-50%, -50%) rotateY(360deg);
  z-index: 110;
  border-radius: 24px;
  box-shadow: 0 0 120px rgba(255, 0, 80, 0.28), inset 0 0 60px rgba(255, 255, 255, 0.1);
  background: rgba(12, 12, 24, 0.98);
  background-size: cover;
  background-position: center;
  color: white;
}

.card.active .card-inner {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  padding: 24px;
  height: 100%;
  width: 100%;
}

.card.active .card-number {
  display: none;
}

.card.active .card-actions {
  display: flex;
  flex-direction: row;
  gap: 16px;
  width: 100%;
  justify-content: center;
  align-items: center;
}

.card .card-actions button {
  flex: 1;
  max-width: 160px;
  padding: 14px 16px;
  border: none;
  border-radius: 14px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  color: white;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  transition: background 0.25s ease, transform 0.2s ease;
}

.card .card-actions button:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: scale(1.05);
}

.card .btn.correct {
  background: rgba(80, 220, 120, 0.22);
}

.card .btn.correct:hover {
  background: rgba(80, 220, 120, 0.35);
}

.card .btn.wrong {
  background: rgba(255, 65, 65, 0.22);
}

.card .btn.wrong:hover {
  background: rgba(255, 65, 65, 0.35);
}

#bg-video,
#click-video {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  border: none;
}

.card:hover {
  transform: translateY(-6px) scale(1.03);
}

.card.active:hover {
  transform: translate(-50%, -50%) rotateY(360deg);
}
