/* 어른이용 게임 공용 스타일 (이상형 월드컵 · 밸런스 게임 · 스도쿠 · 프리셀)
   밤 라운지: 짙은 남보라 바탕 + 크림 종이 카드 + 금 · 코랄 포인트 */
:root {
  --ad-night: #15112b;
  --ad-night-2: #231a40;
  --ad-on: #fff4e6;
  --ad-on-sub: rgba(255, 244, 230, 0.72);
  --ad-card: #fffaf2;
  --ad-ink: #2b2140;
  --ad-sub: #7d7189;
  --ad-line: #eadfcd;
  --ad-accent: #ff6b5e;
  --ad-accent-2: #ff9a5a;
  --ad-accent-deep: #d9434f;
  --ad-blue: #5a76ff;
  --ad-blue-2: #7a5cff;
  --ad-blue-deep: #3c4fd6;
  --ad-green: #2fae74;
  --ad-gold: #ffc94a;
  --ad-gold-deep: #c98a12;
  --ad-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 18px 40px rgba(5, 2, 20, 0.38);
  --ad-radius: 22px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--ad-night);
  color: var(--ad-on);
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body {
  background:
    radial-gradient(70% 45% at 10% 0%, rgba(255, 107, 94, 0.28), transparent 65%),
    radial-gradient(60% 40% at 95% 8%, rgba(122, 92, 255, 0.3), transparent 65%),
    radial-gradient(70% 50% at 50% 105%, rgba(47, 174, 160, 0.18), transparent 65%),
    linear-gradient(180deg, var(--ad-night-2), var(--ad-night) 55%);
  background-attachment: fixed;
}

/* 은은한 별가루 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, rgba(255, 255, 255, 0.55), transparent 60%),
    radial-gradient(1.5px 1.5px at 78% 12%, rgba(255, 255, 255, 0.45), transparent 60%),
    radial-gradient(1px 1px at 42% 32%, rgba(255, 255, 255, 0.5), transparent 60%),
    radial-gradient(1.5px 1.5px at 88% 46%, rgba(255, 230, 170, 0.5), transparent 60%),
    radial-gradient(1px 1px at 22% 64%, rgba(255, 255, 255, 0.4), transparent 60%),
    radial-gradient(1.5px 1.5px at 64% 78%, rgba(255, 230, 170, 0.4), transparent 60%),
    radial-gradient(1px 1px at 8% 88%, rgba(255, 255, 255, 0.35), transparent 60%);
  opacity: 0.8;
}

.stage {
  position: relative;
  width: min(560px, 100%);
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(64px, env(safe-area-inset-top)) 16px max(28px, env(safe-area-inset-bottom));
}

.stage.wide {
  width: min(860px, 100%);
}

.hidden {
  display: none !important;
}

.ad-screen {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
}

/* 시작 화면 포스터 */
.ad-hero {
  display: block;
  width: 132px;
  height: 132px;
  margin: 0 auto 2px;
  border-radius: 32px;
  box-shadow:
    0 0 0 3px rgba(255, 244, 230, 0.9),
    0 0 0 9px rgba(255, 201, 74, 0.25),
    0 18px 36px rgba(0, 0, 0, 0.45);
  animation: ad-float 4s ease-in-out infinite;
}

@keyframes ad-float {
  50% {
    transform: translateY(-5px) rotate(-1.5deg);
  }
}

.ad-kicker {
  align-self: center;
  margin: 0;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 201, 74, 0.45);
  background: rgba(255, 201, 74, 0.12);
  color: var(--ad-gold);
  font-family: "Jua", sans-serif;
  font-size: 14px;
  letter-spacing: 0.03em;
  text-align: center;
}

.ad-title {
  margin: 0;
  font-family: "Bagel Fat One", "Jua", sans-serif;
  font-weight: 400;
  font-size: clamp(36px, 10vw, 54px);
  line-height: 1.12;
  text-align: center;
  color: #ffe08a;
  background: linear-gradient(180deg, #fffbe9 10%, #ffe08a 55%, #ffb03a 95%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 3px 0 #3a1d4a) drop-shadow(0 10px 22px rgba(255, 150, 60, 0.28));
}

.ad-sub {
  margin: 0;
  color: var(--ad-on-sub);
  font-size: 15px;
  line-height: 1.6;
  text-align: center;
}

.ad-card {
  background: var(--ad-card);
  color: var(--ad-ink);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--ad-radius);
  box-shadow: var(--ad-shadow);
  padding: 16px;
}

.ad-btn {
  appearance: none;
  position: relative;
  border: 0;
  border-radius: 16px;
  padding: 15px 18px;
  font: inherit;
  font-family: "Jua", sans-serif;
  font-size: 19px;
  color: #fff;
  background: linear-gradient(180deg, var(--ad-accent-2), var(--ad-accent));
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.35),
    0 5px 0 var(--ad-accent-deep),
    0 12px 24px rgba(255, 90, 80, 0.3);
  text-shadow: 0 1px 2px rgba(120, 20, 30, 0.35);
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.15s;
  text-decoration: none;
  text-align: center;
}

.ad-btn:active {
  transform: translateY(4px);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.3),
    0 1px 0 var(--ad-accent-deep),
    0 4px 10px rgba(255, 90, 80, 0.25);
}

@media (hover: hover) {
  .ad-btn:hover {
    filter: brightness(1.06);
  }
}

.ad-btn.soft {
  color: var(--ad-ink);
  background: linear-gradient(180deg, #fffdf8, #f3ebdd);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 1px 0 #fff, 0 4px 0 #cdbfa8, 0 10px 20px rgba(5, 2, 20, 0.25);
  text-shadow: none;
}

.ad-btn.soft:active {
  box-shadow: inset 0 1px 0 #fff, 0 1px 0 #cdbfa8;
}

.ad-btn.blue {
  background: linear-gradient(180deg, var(--ad-blue), var(--ad-blue-2));
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.3),
    0 5px 0 var(--ad-blue-deep),
    0 12px 24px rgba(90, 100, 255, 0.32);
  text-shadow: 0 1px 2px rgba(20, 20, 90, 0.35);
}

.ad-btn.blue:active {
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.3), 0 1px 0 var(--ad-blue-deep);
}

.ad-btn.kakao {
  color: #191600;
  background: linear-gradient(180deg, #ffeb3b, #fee500);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5), 0 5px 0 #c9b400, 0 12px 22px rgba(254, 229, 0, 0.22);
  text-shadow: none;
}

.ad-btn.kakao:active {
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5), 0 1px 0 #c9b400;
}

.ad-btn:disabled {
  filter: grayscale(0.6) opacity(0.55);
  cursor: default;
}

.ad-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.ad-row > * {
  flex: 1 1 0;
  min-width: 0;
}

.ad-row > .ad-btn {
  font-size: 17px;
  padding: 13px 8px;
  white-space: nowrap;
}

.ad-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.ad-chip {
  appearance: none;
  border: 1.5px solid var(--ad-line);
  background: #fff;
  color: var(--ad-ink);
  border-radius: 999px;
  padding: 9px 16px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 0 var(--ad-line);
  transition: transform 0.08s;
}

.ad-chip:active {
  transform: translateY(2px);
}

.ad-chip.on {
  border-color: transparent;
  background: linear-gradient(180deg, var(--ad-accent-2), var(--ad-accent));
  color: #fff;
  box-shadow: 0 3px 0 var(--ad-accent-deep), 0 6px 14px rgba(255, 90, 80, 0.3);
}

/* 대결 메달 (VS) */
.ad-vs {
  position: relative;
  z-index: 2;
  justify-self: center;
  align-self: center;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: -16px auto;
  border-radius: 50%;
  background: linear-gradient(180deg, #ff7a6b, #e2365a);
  box-shadow:
    0 0 0 4px var(--ad-gold),
    0 0 0 8px var(--ad-night),
    0 10px 22px rgba(0, 0, 0, 0.45);
  color: #fff6d6;
  font-family: "Bagel Fat One", "Jua", sans-serif;
  font-size: 22px;
  line-height: 1;
  text-shadow: 0 2px 0 #5a1030;
}

.ad-msg {
  min-height: 1.4em;
  margin: 0;
  color: var(--ad-on-sub);
  font-size: 14px;
  text-align: center;
}

.ad-card .ad-msg,
.ad-prize .ad-msg {
  color: var(--ad-sub);
}

.ad-home {
  display: block;
  margin-top: 6px;
  color: var(--ad-on-sub);
  font-size: 14px;
  text-align: center;
  text-decoration: none;
}

.ad-toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(20px);
  background: rgba(255, 250, 242, 0.96);
  color: var(--ad-ink);
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 60;
  white-space: nowrap;
}

.ad-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* 결과 카드: 금테 종이 */
.ad-prize {
  position: relative;
  overflow: hidden;
  padding: 26px 16px 22px;
  border: 3px solid transparent;
  border-radius: 26px;
  background:
    linear-gradient(170deg, #fffaf0, #ffeedd) padding-box,
    linear-gradient(135deg, #ffe08a, #ff9a5a 45%, #ffd766 70%, #c98a12) border-box;
  color: var(--ad-ink);
  text-align: center;
  box-shadow: 0 0 40px rgba(255, 201, 74, 0.28), 0 20px 44px rgba(5, 2, 20, 0.45);
}

.ad-prize::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 38%;
  width: 520px;
  height: 520px;
  margin: -260px 0 0 -260px;
  background: repeating-conic-gradient(from 0deg, rgba(255, 201, 74, 0.16) 0 10deg, transparent 10deg 20deg);
  animation: ad-spin 24s linear infinite;
  pointer-events: none;
}

.ad-prize > * {
  position: relative;
}

@keyframes ad-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ad-hero,
  .ad-prize::before {
    animation: none;
  }
}

/* 진행 막대 (어두운 바탕 위) */
.ad-progress {
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.ad-progress i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--ad-accent), var(--ad-gold));
  box-shadow: 0 0 12px rgba(255, 201, 74, 0.6);
  transition: width 0.3s ease;
}

/* 게임 화면 위쪽 정보 줄 */
.ad-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  color: var(--ad-on);
  font-family: "Jua", sans-serif;
  font-size: 18px;
}

.ad-badge {
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 201, 74, 0.14);
  border: 1px solid rgba(255, 201, 74, 0.4);
  color: var(--ad-gold);
  font-family: "Jua", sans-serif;
  font-size: 16px;
  white-space: nowrap;
}

/* SEO 소개 블록이 시작 화면 안에 들어올 때 */
.seo-about {
  text-align: left;
  box-shadow: var(--ad-shadow);
}
