/* =================== RESET & FONTS =================== */
@font-face {
  font-family: "BB Strata Pro SEF";
  src: url("../assets/fonts/BBStrataProSEF-Bold.woff2") format("woff2"), url("../assets/fonts/BBStrataProSEF-Bold.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  font-family: "BB Strata Pro SEF", sans-serif;
  background: #05559c;
  background: linear-gradient(90deg, rgba(5, 85, 156, 1) 0%, rgba(11, 3, 163, 1) 50%, rgba(0, 3, 38, 1) 100%);
  background-size: cover;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
}

.game-container {
  padding-left: 3%;
  width: 95vw;
  height: 95vh;
  display: flex;
  flex-direction: row; /* arena kiri, panel kanan */
  justify-content: space-between;
  gap: 10%;
}

.game-board {
  width: 72%; /* sedikit lebih lebar agar proporsional */
  height: 100%;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 1px; /* 🔥 dari 5px → 2px agar jarak antar kartu lebih rapat */
  justify-items: center;
  align-items: center;
}

.card {
  width: 95%; /* biar sedikit menyesuaikan padding grid */
  height: 95%;
  perspective: 1200px;
  cursor: pointer;
}

/* Agar saat hover terasa dinamis tapi tetap rapat */
.card:hover {
  transform: scale(1.02);
  transition: transform 0.2s ease;
}

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

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

.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  backface-visibility: hidden;
  background-size: cover;
  background-position: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

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

/* =================== INFO PANEL (KANAN) =================== */

/* =================== INFO PANEL (KANAN) =================== */
.info-panel {
  width: 35%;
  padding: 1.5rem 1rem; /* dikurangi padding */
  background: linear-gradient(180deg, #0b0c1073 0%, #10182064 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  border-left: 2px solid rgba(0, 255, 255, 0.3);
  box-shadow: inset 0 0 20px rgba(0, 255, 255, 0.1);
  gap: 1rem; /* jarak antar blok lebih kecil */
  flex: 1 1 auto; /* biar panel menyesuaikan tinggi */
  max-height: 100%; /* jangan melebihi container */
}

/* Branding */
.branding {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}
.branding .logo {
  width: 140px; /* dikurangi biar tidak terlalu tinggi */
  filter: drop-shadow(0 0 12px rgba(0, 255, 255, 0.6));
  transition: transform 0.3s ease;
  padding-bottom: 5px;
}
.branding .logo:hover {
  transform: scale(1.05);
}
.tagline {
  color: #00eaff;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 1px;
}

/* Status */
.status {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 0.8rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.1);
}
.status-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.status-item span {
  font-weight: 700;
  color: #00eaff;
}

/* Message */
.message {
  font-size: 1rem;
  line-height: 1.3;
  color: #ccc;
  max-width: 90%;
}
.message .highlight {
  color: #00eaff;
  font-weight: 600;
}

/* Services */
.services {
  margin: 0.5rem 0;
  font-size: 0.95rem;
  color: #00eaff;
  text-align: center;
  line-height: 1.3;
}
.services p {
  margin: 0;
  word-wrap: break-word;
}

/* CTA */
.cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin-top: auto; /* biar selalu di bawah */
}
.cta img {
  width: 110px;
  border-radius: 12px;
  box-shadow: 0 0 12px rgba(0, 255, 255, 0.4);
  transition: transform 0.2s ease;
}
.cta img:hover {
  transform: scale(1.05);
}
.cta-title {
  font-size: 1rem;
  color: #00eaff;
  font-weight: 600;
}

/* SCROLLING CONTACT INFO */
.contact-bar {
  width: 100%;
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding: 8px 0;
  background: rgba(255, 255, 255, 0.03);
  position: relative;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.scroll-content {
  display: inline-flex;
  align-items: center;
  gap: 50px;
  white-space: nowrap;
  will-change: transform;
  animation: scrollLoop 20s linear infinite; /* lebih cepat supaya semua terlihat */
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: #ddd;
  transition: color 0.2s ease;
}

.social-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: none; /* biar warna asli logo tetap */
  transition: transform 0.2s ease, filter 0.2s ease;
}

.contact-item:hover .social-icon {
  transform: scale(1.2);
  filter: drop-shadow(0 0 6px rgba(0, 191, 255, 0.7));
}
.contact-item:hover span {
  color: #00bfff;
}

/* Animasi looping */
@keyframes scrollLoop {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  } /* geser setengah karena duplikat */
}

/* =================== WIN SCREEN =================== */
.win-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.win-info {
  font-size: 2rem;
  color: #fff;
  text-align: center;
  text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.7);
}

.win-time {
  font-size: 1.5rem;
  color: #fff;
  text-align: center;
  text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.7);
}

.win-box::after {
  content: "VOXLUMEDIA";
  right: 0;
  left: 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.2);
  font-size: 1rem;
  letter-spacing: 4px;
}

.win-box {
  background: url("../assets/ui/modal-win-bg.png") no-repeat center center;
  background-size: cover;
  /* width: 40vw; */
  max-width: 450px;
  aspect-ratio: 355 / 477;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 2rem;
  gap: 50px;
}

.win-title {
  font-size: 2rem;
  color: #ffdf7f;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.4);
}

.star-image {
  width: 80%;
  height: auto;
  object-fit: contain;
  z-index: 999;
}

/* =================== BUTTONS =================== */
.button-group {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: auto;
  padding-bottom: 1rem;
}

.menu-button,
.next-button {
  width: 150px;
  height: 50px;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 18px;
  font-weight: 700;
  border: none;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 10px;
}

.menu-button {
  background: linear-gradient(180deg, #2f2d36 0%, #22212d 100%);
  color: white;
  box-shadow: inset 0 1px #586776, inset 0 -4px #586776;
}

.next-button {
  background: linear-gradient(180deg, #fea319 0%, #ffc634 78%);
  color: black;
  box-shadow: inset 0 1px #ff8a00, inset 0 -4px #ff8a00;
}

#play-button {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  border: none;
  text-align: center;
  padding: 15px 40px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 10px;
}

#play-button {
  background: linear-gradient(180deg, #fea319 0%, #ffc634 78%);
  color: black;
  box-shadow: inset 0 1px #ff8a00, inset 0 -4px #ff8a00;
}

#play-button:hover {
  background: #ffd103;
  transform: scale(1.05);
}

.start-button {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  border: none;
  text-align: center;
  padding: 15px 40px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 10px;
}

.start-button {
  background: linear-gradient(180deg, #19c1fe 0%, #3467ff 78%);
  color: rgb(255, 255, 255);
  box-shadow: inset 0 1px #0015ff, inset 0 -4px #1e00ff;
}

.start-button:hover {
  background: #0088cc;
  transform: scale(1.05);
}

/* =================== RESPONSIVE SMART TV =================== */
@media screen and (min-width: 1920px) {
  .ui-block span {
    font-size: 32px;
  }
  .level-number {
    font-size: 48px;
  }
  .win-title {
    font-size: 3rem;
  }
  .menu-button,
  .next-button {
    width: 180px;
    height: 70px;
    font-size: 24px;
  }
}

/* ==================== HOW TO PLAY MODAL ==================== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: linear-gradient(135deg, #7997b778, #7997b7);
  color: white;
  padding: 3rem;
  border-radius: 20px;
  width: 90%;
  max-width: 500px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: popIn 0.4s ease-out;
}

.modal-content h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #ffe066;
  text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.6);
}

.modal-content p {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.modal-content ul {
  text-align: left;
  margin: 1rem 0;
  padding-left: 1.2rem;
}

.modal-content ul li {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

#startGameBtn {
  margin-top: 2rem;
  padding: 0.8rem 2rem;
  font-size: 1.2rem;
  font-weight: bold;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  background: linear-gradient(90deg, #fea319, #ffc634);
  color: black;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#startGameBtn:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* Pop-in animation */
@keyframes popIn {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* =================== MOBILE RESPONSIVE =================== */
@media screen and (max-width: 768px) {
  html,
  body {
    width: 100vw;
    height: 100vh;
    overflow-y: auto;
    padding: 0;
  }

  .game-container {
    flex-direction: column; /* logo/timer → main → info */
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    width: 100%;
    /* height: auto; */
  }

  /* Logo & Timer */
  .branding,
  .status {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
  }

  .branding .logo {
    width: 100px;
  }
  .status {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
  }

  /* Main game board */
  .game-board {
    width: 100%;
    max-width: 400px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
  }

  .card {
    width: 100%;
    aspect-ratio: 1/1;
    perspective: 800px;
  }

  /* Info panel bawah */
  .info-panel {
    width: 100%;
    padding: 1rem;
    border-left: none;
    border-top: 2px solid rgba(0, 255, 255, 0.3);
    box-shadow: inset 0 0 15px rgba(0, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  /* Buttons responsive */
  .button-group {
    flex-direction: column;
    gap: 10px;
    width: 100%;
    align-items: center;
  }

  .menu-button,
  .next-button,
  #play-button,
  .start-button {
    width: 80%;
    font-size: 1rem;
    padding: 12px 0;
  }

  /* Win screen responsive */
  .win-box {
    max-width: 90%;
    padding: 1.5rem;
    gap: 20px;
  }

  .win-title {
    font-size: 1.8rem;
  }
  .star-image {
    width: 90%;
  }
}
