/* =========================================================
   SHAHD - من سيربح المليون
   style.css
========================================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --navy-dark: #050817;
  --navy: #0b1230;
  --navy-light: #17265c;
  --blue: #2456d9;
  --blue-light: #4f7cff;
  --gold: #f4c451;
  --gold-light: #ffe39a;
  --gold-dark: #a87312;
  --white: #ffffff;
  --muted: #c8d0ea;
  --green: #20bb73;
  --red: #e94c5f;
  --glass: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.16);
  --shadow: 0 20px 55px rgba(0, 0, 0, 0.45);
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  direction: rtl;
  color: var(--white);

  background:
    radial-gradient(
      circle at top,
      #17265c 0%,
      #0b1230 35%,
      #050817 75%,
      #02030b 100%
    );

  overflow-x: hidden;
}

button,
input {
  font-family: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

img {
  max-width: 100%;
  display: block;
}

.hidden {
  display: none !important;
}


/* =========================
   MAIN APP
========================= */

.game-app {
  width: 100%;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

.game-app::before,
.game-app::after {
  content: "";
  position: fixed;
  width: 450px;
  height: 450px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
}

.game-app::before {
  top: -160px;
  right: -160px;
  background: #315dff;
}

.game-app::after {
  bottom: -180px;
  left: -180px;
  background: #d49a24;
}


/* =========================
   LOGOS
========================= */

.partners-header {
  width: min(1200px, 94%);
  margin: 0 auto;
  padding: 25px 0 10px;

  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  gap: 20px;

  position: relative;
  z-index: 2;
}

.partner-logo-box {
  min-height: 105px;
  padding: 12px 20px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 18px;

  background: #ffffff;

  border: 1px solid rgba(0, 0, 0, 0.08);

  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.18);
}

.partner-logo {
  width: 100%;
  height: 80px;
  object-fit: contain;
}

.main-logo-box {
  border-color: rgba(244, 196, 81, 0.50);

  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.18),
    0 0 25px rgba(244, 196, 81, 0.15);
}


/* =========================
   MAIN CONTAINER
========================= */

.game-container {
  width: min(1180px, 94%);
  margin: 20px auto 60px;
  position: relative;
  z-index: 2;
}

.screen {
  width: 100%;
  padding: 40px;

  border-radius: 28px;

  background:
    linear-gradient(
      145deg,
      rgba(21, 32, 75, 0.94),
      rgba(7, 12, 37, 0.96)
    );

  border: 1px solid rgba(255, 255, 255, 0.12);

  box-shadow: var(--shadow);

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}


/* =========================
   START SCREEN
========================= */

.start-screen {
  text-align: center;
  position: relative;
  overflow: hidden;
}

.start-screen::before {
  content: "";
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);

  width: 600px;
  height: 300px;
  border-radius: 50%;

  background: rgba(67, 105, 255, 0.12);
  filter: blur(50px);

  pointer-events: none;
}

.game-heading {
  position: relative;
  z-index: 2;
  margin-bottom: 32px;
}

.welcome-text {
  color: var(--gold);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.game-title {
  font-size: clamp(34px, 6vw, 64px);
  font-weight: 900;
  line-height: 1.2;
  color: var(--white);

  text-shadow: 0 0 22px rgba(67, 105, 255, 0.45);

  margin-bottom: 16px;
}

.game-title::after {
  content: "";
  display: block;

  width: 120px;
  height: 4px;

  margin: 18px auto 0;

  border-radius: 20px;

  background:
    linear-gradient(
      90deg,
      transparent,
      var(--gold),
      transparent
    );
}

.game-subtitle {
  max-width: 700px;
  margin: auto;

  color: var(--muted);

  font-size: 18px;
  line-height: 1.8;
}

.game-subtitle strong {
  color: var(--gold-light);
}


/* =========================
   PLAYER
========================= */

.player-name-section {
  width: min(520px, 100%);
  margin: 30px auto;
  text-align: right;
}

.player-name-section label {
  display: block;

  margin-bottom: 10px;

  color: #e6eafe;

  font-weight: 700;
  font-size: 15px;
}

.player-name-input {
  width: 100%;
  height: 55px;
  padding: 0 18px;

  color: var(--white);
  font-size: 16px;

  outline: none;

  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;

  background: rgba(255, 255, 255, 0.06);

  transition: 0.25s ease;
}

.player-name-input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.player-name-input:focus {
  border-color: var(--gold);

  box-shadow:
    0 0 0 4px rgba(244, 196, 81, 0.10);
}


/* =========================
   AGE SELECTION
========================= */

.age-selection {
  margin-top: 30px;
}

.age-selection h2 {
  margin-bottom: 20px;
  font-size: 22px;
}

.age-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);

  gap: 16px;

  margin-bottom: 28px;
}

.age-card {
  min-height: 125px;

  padding: 20px;

  border-radius: 20px;

  border: 1px solid rgba(255, 255, 255, 0.14);

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.07),
      rgba(255, 255, 255, 0.025)
    );

  color: var(--white);

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  gap: 8px;

  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.age-card:hover {
  transform: translateY(-4px);

  border-color: rgba(244, 196, 81, 0.55);

  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.22);
}

.age-card.selected {
  border-color: var(--gold);

  background:
    linear-gradient(
      145deg,
      rgba(244, 196, 81, 0.18),
      rgba(36, 86, 217, 0.15)
    );

  box-shadow:
    0 0 30px rgba(244, 196, 81, 0.15);
}

.age-number {
  color: var(--gold);
  font-size: 28px;
  font-weight: 900;
}

.age-label {
  color: var(--muted);
  font-size: 15px;
}


/* =========================
   PRIMARY BUTTON
========================= */

.primary-btn {
  min-width: 210px;
  min-height: 54px;

  padding: 13px 26px;

  border: none;
  border-radius: 14px;

  font-size: 17px;
  font-weight: 800;

  color: #1b1300;

  background:
    linear-gradient(
      135deg,
      #ffe293,
      #f4bd42,
      #c58c1c
    );

  box-shadow:
    0 10px 28px rgba(244, 196, 81, 0.20);

  transition: 0.2s ease;
}

.primary-btn:not(:disabled):hover {
  transform: translateY(-2px);

  box-shadow:
    0 14px 34px rgba(244, 196, 81, 0.30);
}

.primary-btn:not(:disabled):active {
  transform: translateY(1px);
}


/* =========================
   TOP BAR
========================= */

.game-topbar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);

  gap: 15px;

  margin-bottom: 16px;
}

.player-info,
.question-progress,
.score-info {
  min-height: 72px;

  padding: 14px 18px;

  border-radius: 16px;

  background: rgba(255, 255, 255, 0.055);

  border: 1px solid rgba(255, 255, 255, 0.10);

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.question-progress {
  color: var(--gold-light);
  font-size: 17px;
  font-weight: 800;
}

.topbar-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 5px;
}

.player-info strong,
.score-info strong {
  font-size: 18px;
  color: var(--white);
}


/* =========================
   SOUND
========================= */

.sound-controls {
  display: flex;
  justify-content: flex-end;

  margin-bottom: 16px;
}

.icon-btn {
  width: 44px;
  height: 44px;

  border-radius: 50%;

  border: 1px solid rgba(255, 255, 255, 0.14);

  background: rgba(255, 255, 255, 0.07);

  color: white;
  font-size: 18px;

  display: flex;
  align-items: center;
  justify-content: center;

  transition: 0.2s ease;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.13);

  transform: scale(1.06);
}

.icon-btn.off {
  opacity: 0.45;
}


/* =========================
   LIFELINES
========================= */

.lifelines {
  display: grid;
  grid-template-columns: repeat(3, 1fr);

  gap: 13px;

  margin-bottom: 24px;
}

.lifeline-btn {
  min-height: 68px;

  padding: 10px 14px;

  border-radius: 16px;

  border:
    1px solid rgba(80, 120, 255, 0.35);

  background:
    linear-gradient(
      145deg,
      rgba(36, 86, 217, 0.20),
      rgba(255, 255, 255, 0.035)
    );

  color: var(--white);

  display: flex;
  align-items: center;
  justify-content: center;

  gap: 10px;

  font-weight: 700;

  transition: 0.2s ease;
}

.lifeline-btn:hover:not(:disabled) {
  border-color: var(--blue-light);

  background: rgba(36, 86, 217, 0.28);

  transform: translateY(-2px);
}

.lifeline-btn:disabled,
.lifeline-btn.used {
  opacity: 0.30;

  filter: grayscale(0.5);
}

.lifeline-icon {
  min-width: 42px;
  height: 42px;

  padding: 0 6px;

  border-radius: 50%;

  background: rgba(255, 255, 255, 0.08);

  display: flex;
  align-items: center;
  justify-content: center;

  color: var(--gold);

  font-size: 14px;
  font-weight: 900;
}


/* =========================
   QUESTION + LADDER
========================= */

.play-area {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr) 245px;

  gap: 24px;

  align-items: start;
}

.question-column {
  min-width: 0;
}


/* =========================
   QUESTION
========================= */

.question-meta {
  display: flex;

  align-items: center;
  justify-content: center;

  gap: 10px;

  margin-bottom: 15px;
}

.category-badge,
.difficulty-badge {
  padding: 8px 14px;

  border-radius: 30px;

  font-size: 13px;
  font-weight: 700;

  border:
    1px solid rgba(255, 255, 255, 0.10);
}

.category-badge {
  background: rgba(36, 86, 217, 0.22);

  color: #cfdcff;
}

.difficulty-badge {
  background: rgba(244, 196, 81, 0.12);

  color: var(--gold-light);
}

.question-card {
  min-height: 150px;

  padding: 28px;

  border-radius: 22px;

  background:
    linear-gradient(
      145deg,
      rgba(28, 43, 99, 0.85),
      rgba(8, 14, 43, 0.90)
    );

  border:
    1px solid rgba(244, 196, 81, 0.22);

  box-shadow:
    inset 0 0 30px rgba(36, 86, 217, 0.08);

  display: flex;
  align-items: center;
  justify-content: center;

  text-align: center;

  margin-bottom: 24px;
}

.question-text {
  font-size:
    clamp(20px, 2.7vw, 28px);

  font-weight: 800;

  line-height: 1.7;

  color: var(--white);
}


/* =========================
   ANSWERS
========================= */

.answers-grid {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 15px;
}

.answer-btn {
  width: 100%;

  min-height: 86px;
  height: auto;

  padding: 15px 18px;

  border-radius: 18px;

  border:
    1px solid rgba(255, 255, 255, 0.13);

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.065),
      rgba(255, 255, 255, 0.025)
    );

  color: var(--white);

  display: flex;

  align-items: flex-start;

  text-align: right;

  gap: 14px;

  font-size: 16px;

  transition: all 0.2s ease;
}

.answer-btn:hover:not(:disabled) {
  border-color: var(--gold);

  background:
    rgba(244, 196, 81, 0.10);

  transform: translateY(-2px);

  box-shadow:
    0 10px 25px rgba(0, 0, 0, 0.18);
}

.answer-letter {
  flex-shrink: 0;

  width: 42px;
  height: 42px;

  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;

  color: #1e1500;

  background:
    linear-gradient(
      135deg,
      #ffe799,
      #e9b038
    );

  font-weight: 900;
  font-size: 17px;

  direction: ltr;
}

.answer-text {
  flex: 1;

  min-width: 0;

  line-height: 1.7;

  overflow-wrap: anywhere;
}

.answer-btn.selected {
  border-color: #6f8fff;

  background:
    rgba(58, 92, 230, 0.22);

  box-shadow:
    0 0 25px rgba(58, 92, 230, 0.18);
}

.answer-btn.correct {
  border-color: var(--green);

  background:
    rgba(32, 187, 115, 0.18);

  box-shadow:
    0 0 25px rgba(32, 187, 115, 0.15);
}

.answer-btn.correct .answer-letter {
  background: var(--green);

  color: white;
}

.answer-btn.wrong {
  border-color: var(--red);

  background:
    rgba(233, 76, 95, 0.17);

  box-shadow:
    0 0 25px rgba(233, 76, 95, 0.13);
}

.answer-btn.wrong .answer-letter {
  background: var(--red);

  color: white;
}

.answer-btn.removed {
  opacity: 0.12;

  pointer-events: none;
}


/* =========================
   FEEDBACK
========================= */

.feedback-message {
  min-height: 40px;

  margin-top: 20px;

  display: flex;
  align-items: center;
  justify-content: center;

  text-align: center;

  font-size: 19px;
  font-weight: 800;
}

.feedback-message.correct-message {
  color: #78efae;
}

.feedback-message.wrong-message {
  color: #ff8897;
}


/* =========================
   PRIZE LADDER
========================= */

.prize-ladder {
  padding: 18px 14px;

  border-radius: 20px;

  background:
    linear-gradient(
      180deg,
      rgba(5, 9, 30, 0.98),
      rgba(11, 18, 48, 0.98)
    );

  border:
    1px solid rgba(244, 196, 81, 0.25);

  box-shadow:
    0 15px 35px rgba(0, 0, 0, 0.30);

  position: sticky;

  top: 18px;
}

.prize-title {
  text-align: center;

  color: var(--gold);

  font-size: 18px;

  margin-bottom: 14px;
}

.prize-list {
  display: flex;

  flex-direction: column;

  gap: 3px;
}

.prize-item {
  min-height: 34px;

  display: grid;

  grid-template-columns:
    34px 1fr;

  align-items: center;

  padding: 5px 10px;

  border-radius: 8px;

  color: #d6dcf0;

  font-size: 14px;

  transition:
    background 0.25s ease,
    color 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.prize-number {
  color: #8c9ac7;

  font-size: 12px;

  font-weight: 700;
}

.prize-item strong {
  direction: ltr;

  text-align: left;

  letter-spacing: 0.5px;
}

.prize-item.milestone {
  color: var(--gold-light);
}

.prize-item.jackpot {
  color: var(--gold);

  font-size: 16px;
}

.prize-item.active {
  color: #171000;

  background:
    linear-gradient(
      135deg,
      #ffe08a,
      #f2b536
    );

  transform: scale(1.04);

  box-shadow:
    0 0 22px rgba(244, 196, 81, 0.35);
}

.prize-item.active .prize-number {
  color: #5b3d00;
}

.prize-item.active strong {
  color: #171000;
}

.prize-item.passed {
  color: #7ce8ae;
}

.prize-item.passed .prize-number {
  color: #50c987;
}


/* =========================
   GAME ACTIONS
========================= */

.game-actions {
  margin-top: 28px;

  text-align: center;
}

.secondary-btn {
  min-height: 48px;

  padding: 11px 22px;

  border-radius: 13px;

  border:
    1px solid rgba(255, 255, 255, 0.15);

  background:
    rgba(255, 255, 255, 0.06);

  color: var(--muted);

  font-weight: 700;

  transition: 0.2s ease;
}

.secondary-btn:hover {
  background:
    rgba(255, 255, 255, 0.11);

  color: white;
}


/* =========================
   MODAL
========================= */

.modal {
  position: fixed;

  inset: 0;

  z-index: 1000;

  padding: 20px;

  background:
    rgba(1, 3, 13, 0.78);

  display: flex;

  align-items: center;
  justify-content: center;

  backdrop-filter: blur(9px);

  -webkit-backdrop-filter: blur(9px);
}

.modal-content {
  width:
    min(460px, 100%);

  position: relative;

  padding: 38px;

  border-radius: 24px;

  background:
    linear-gradient(
      145deg,
      #172458,
      #090e29
    );

  border:
    1px solid rgba(255, 255, 255, 0.15);

  text-align: center;

  box-shadow:
    0 25px 80px rgba(0, 0, 0, 0.55);
}

.modal-content h2 {
  font-size: 27px;

  color: var(--gold);

  margin-bottom: 12px;
}

.modal-content p {
  color: var(--muted);

  line-height: 1.7;
}

.modal-close {
  position: absolute;

  top: 12px;
  left: 14px;

  width: 38px;
  height: 38px;

  border-radius: 50%;

  border:
    1px solid rgba(255, 255, 255, 0.12);

  background:
    rgba(255, 255, 255, 0.06);

  color: white;

  font-size: 24px;
}

.friend-timer {
  width: 125px;
  height: 125px;

  margin: 26px auto;

  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;

  color: var(--gold-light);

  font-size: 44px;
  font-weight: 900;

  border:
    4px solid var(--gold);

  background:
    rgba(244, 196, 81, 0.06);

  box-shadow:
    0 0 30px rgba(244, 196, 81, 0.15);
}


/* =========================
   RESULT SCREEN
========================= */

.result-screen {
  text-align: center;
}

.result-card {
  max-width: 600px;

  margin: auto;

  padding: 35px 20px;
}

.result-small-title {
  color: var(--gold);

  font-size: 14px;

  font-weight: 800;

  margin-bottom: 8px;
}

.result-card h2 {
  font-size:
    clamp(34px, 5vw, 54px);

  margin-bottom: 15px;
}

.result-card p {
  color: var(--muted);

  font-size: 17px;

  line-height: 1.7;
}

.final-score-box {
  width: 180px;
  height: 180px;

  margin: 30px auto;

  border-radius: 50%;

  display: flex;

  flex-direction: column;

  align-items: center;
  justify-content: center;

  border:
    3px solid var(--gold);

  background:
    radial-gradient(
      circle,
      rgba(244, 196, 81, 0.16),
      rgba(244, 196, 81, 0.025)
    );

  box-shadow:
    0 0 35px rgba(244, 196, 81, 0.16);
}

.final-score-box span {
  color: var(--muted);

  font-size: 14px;
}

.final-score-box strong {
  margin-top: 6px;

  color: var(--gold-light);

  font-size: 42px;

  direction: ltr;
}


/* =========================
   NEW RESULT ACTIONS
========================= */

.result-actions {
  display: flex;

  align-items: center;
  justify-content: center;

  flex-wrap: wrap;

  gap: 14px;

  margin-top: 25px;
}

.result-actions .primary-btn,
.result-actions .secondary-btn {
  min-width: 220px;
}

.result-actions .secondary-btn {
  color: #ffffff;

  background:
    rgba(255, 255, 255, 0.08);

  border:
    1px solid rgba(255, 255, 255, 0.18);
}

.result-actions .secondary-btn:hover {
  background:
    rgba(255, 255, 255, 0.14);

  border-color:
    rgba(244, 196, 81, 0.40);
}


/* =========================
   ANIMATIONS
========================= */

@keyframes fadeIn {
  from {
    opacity: 0;

    transform:
      translateY(12px);
  }

  to {
    opacity: 1;

    transform:
      translateY(0);
  }
}

@keyframes correctPulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.025);
  }

  100% {
    transform: scale(1);
  }
}

.screen:not(.hidden) {
  animation: fadeIn 0.45s ease;
}

.answer-btn.correct {
  animation:
    correctPulse 0.45s ease;
}


/* =========================
   RESPONSIVE
========================= */

@media (max-width: 980px) {

  .screen {
    padding: 30px;
  }

  .play-area {
    grid-template-columns:
      minmax(0, 1fr) 220px;

    gap: 18px;
  }

  .answer-btn {
    font-size: 15px;
  }
}


@media (max-width: 820px) {

  .play-area {
    grid-template-columns: 1fr;
  }

  .prize-ladder {
    position: static;

    order: 2;

    margin-top: 20px;
  }

  .prize-list {
    max-width: 460px;

    margin: auto;
  }
}


@media (max-width: 720px) {

  .partners-header {
    grid-template-columns: 1fr;

    width:
      min(430px, 94%);

    gap: 10px;
  }

  .partner-logo-box {
    min-height: 82px;
  }

  .partner-logo {
    height: 62px;
  }

  .screen {
    padding:
      25px 18px;

    border-radius: 22px;
  }

  .game-container {
    margin-top: 10px;
  }

  .age-options {
    grid-template-columns: 1fr;
  }

  .age-card {
    min-height: 90px;

    flex-direction: row;
  }

  .game-topbar {
    grid-template-columns: 1fr;

    gap: 8px;
  }

  .player-info,
  .question-progress,
  .score-info {
    min-height: 58px;
  }

  .lifelines {
    grid-template-columns: 1fr;
  }

  .lifeline-btn {
    min-height: 58px;
  }

  .answers-grid {
    grid-template-columns: 1fr;
  }

  .answer-btn {
    min-height: 76px;
  }

  .question-card {
    min-height: 130px;

    padding:
      22px 16px;
  }

  .question-text {
    font-size: 20px;
  }

  .result-actions {
    flex-direction: column;
  }

  .result-actions .primary-btn,
  .result-actions .secondary-btn {
    width: 100%;

    min-width: 0;
  }
}


@media (max-width: 430px) {

  .game-title {
    font-size: 35px;
  }

  .game-subtitle {
    font-size: 15px;
  }

  .screen {
    padding:
      22px 14px;
  }

  .partner-logo {
    height: 58px;
  }

  .answer-btn {
    padding: 12px;
  }

  .answer-letter {
    width: 38px;
    height: 38px;

    font-size: 15px;
  }

  .answer-text {
    font-size: 15px;
  }

  .primary-btn {
    width: 100%;
  }

  .modal-content {
    padding:
      32px 18px;
  }
}


/* =========================
   ACCESSIBILITY
========================= */

button:focus-visible,
input:focus-visible {
  outline:
    3px solid rgba(244, 196, 81, 0.55);

  outline-offset: 3px;
}