/* 사이트 전체 공통 스타일 — 허브/게임 페이지가 함께 쓰는 테마 */
:root {
  --bg: #0f1226;
  --bg-soft: #181c3a;
  --card: #1e2350;
  --accent: #5b7cfa;
  --accent-2: #f5a623;
  --text: #eef1ff;
  --text-dim: #a4abd6;
  --radius: 16px;
  --maxw: 960px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans KR", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: radial-gradient(1200px 600px at 50% -10%, #23285a 0%, var(--bg) 60%);
  color: var(--text);
  min-height: 100%;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 20px 16px 64px; }

/* 상단 바 */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 16px; max-width: var(--maxw); margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--text); }
.brand .logo {
  width: 32px; height: 32px; display: block; object-fit: contain;
}
.nav { display: flex; align-items: center; }
.nav a { color: var(--text-dim); margin-left: 16px; font-size: 14px; font-weight: 600; }
.nav a:hover { color: var(--text); text-decoration: none; }
.lang-btn {
  margin-left: 16px; background: rgba(255,255,255,.06); color: var(--text);
  border: 1px solid rgba(255,255,255,.14); border-radius: 999px;
  font-size: 13px; font-weight: 700; padding: 6px 14px; cursor: pointer;
}
.lang-btn:hover { background: rgba(255,255,255,.12); }

/* 히어로 */
.hero { text-align: center; padding: 28px 8px 8px; }
.hero h1 { font-size: clamp(28px, 6vw, 44px); margin: 0 0 10px; letter-spacing: -.02em; }
.hero p { color: var(--text-dim); font-size: clamp(15px, 3.5vw, 18px); margin: 0 auto; max-width: 560px; }

/* 게임 카드 그리드 */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; margin-top: 28px; }
.card {
  background: linear-gradient(180deg, var(--card), var(--bg-soft));
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius); overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,.35); text-decoration: none; }
.card .thumb { aspect-ratio: 16/10; display: grid; place-items: center; font-size: 54px; }
.card .body { padding: 14px 16px 18px; }
.card h3 { margin: 0 0 6px; font-size: 18px; color: var(--text); }
.card p { margin: 0; color: var(--text-dim); font-size: 13px; line-height: 1.5; }
.badge { display: inline-block; font-size: 11px; font-weight: 700; color: var(--accent-2); border: 1px solid var(--accent-2); border-radius: 999px; padding: 2px 8px; margin-top: 10px; }

/* 콘텐츠 페이지 */
.content { background: var(--bg-soft); border: 1px solid rgba(255,255,255,.06); border-radius: var(--radius); padding: 24px; margin-top: 20px; }
.content h1 { margin-top: 0; }
.content h2 { color: var(--text); margin-top: 28px; }
.content p, .content li { color: var(--text-dim); line-height: 1.7; }

/* 광고 슬롯 자리 — 애드센스 승인 후 이 안의 placeholder를 광고 코드로 교체 */
.ad-slot {
  margin: 22px auto; max-width: 728px; min-height: 90px;
  display: grid; place-items: center;
  border: 1px dashed rgba(255,255,255,.15); border-radius: 12px;
  color: var(--text-dim); font-size: 12px; letter-spacing: .08em;
}

/* 푸터 */
.site-footer { text-align: center; color: var(--text-dim); font-size: 13px; padding: 30px 16px; border-top: 1px solid rgba(255,255,255,.06); margin-top: 40px; }
.site-footer a { color: var(--text-dim); margin: 0 8px; }

.btn {
  display: inline-block; background: linear-gradient(135deg, var(--accent), #7a92ff);
  color: #fff; font-weight: 700; padding: 12px 22px; border-radius: 12px; margin-top: 18px;
  box-shadow: 0 6px 18px rgba(91,124,250,.45);
}
.btn:hover { text-decoration: none; filter: brightness(1.06); }

/* ===== 계정바 + 프리미엄(광고 제거) ===== */
.account-bar { display: flex; align-items: center; gap: 8px; }
.account-bar .acc-email { color: var(--text-dim); font-size: 12px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-btn { background: rgba(255,255,255,.06); color: var(--text); border: 1px solid rgba(255,255,255,.14); border-radius: 999px; font-size: 12px; font-weight: 700; padding: 6px 12px; cursor: pointer; }
.acc-btn:hover { background: rgba(255,255,255,.12); }
.acc-btn.primary { background: linear-gradient(135deg, var(--accent), #7a92ff); border-color: transparent; }
.acc-badge { color: #62d69a; font-size: 12px; font-weight: 700; }

/* 프리미엄이면 모든 광고 숨김 (계정 단위 광고 제거) */
body.is-premium .ad-slot,
body.is-premium .ad-rail,
body.is-premium #adBreak { display: none !important; }

/* 플랜 선택 모달 */
.modal-back { position: fixed; inset: 0; background: rgba(6,8,20,.7); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 50; padding: 20px; }
.modal-back.hidden { display: none; }
.modal { background: var(--bg-soft); border: 1px solid rgba(255,255,255,.08); border-radius: var(--radius); padding: 22px; width: 100%; max-width: 360px; }
.modal h3 { margin: 0 0 4px; }
.modal .sub { color: var(--text-dim); font-size: 13px; margin: 0 0 16px; }
.plan { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; text-align: left; background: var(--card); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; cursor: pointer; color: var(--text); }
.plan:hover { border-color: var(--accent); }
.plan .p-name { font-weight: 700; }
.plan .p-note { color: var(--text-dim); font-size: 12px; margin-top: 2px; }
.plan .p-price { font-weight: 800; white-space: nowrap; }
.plan.best { border-color: var(--accent-2); }
.plan.best .p-price { color: var(--accent-2); }
.modal .close { display: block; margin: 6px auto 0; background: transparent; border: 0; color: var(--text-dim); font-size: 13px; cursor: pointer; }

/* ===== 게임 방법 가이드 ===== */
.guide-btn { background: rgba(255,255,255,.06); color: var(--text); border: 1px solid rgba(255,255,255,.14); border-radius: 999px; width: 28px; height: 28px; font-size: 14px; font-weight: 800; cursor: pointer; line-height: 1; }
.guide-btn:hover { background: rgba(255,255,255,.12); }
.modal { max-height: 85vh; overflow-y: auto; }
.guide h4 { margin: 14px 0 6px; font-size: 15px; color: var(--text); }
.guide p, .guide li { color: var(--text-dim); font-size: 14px; line-height: 1.6; }
.guide ul { margin: 0; padding-left: 18px; }
.guide .keys { display: inline-block; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: 6px; padding: 1px 7px; font-weight: 700; color: var(--text); font-size: 13px; }

/* ===== 후원(도네이션) ===== */
.support-btn { margin-left: 8px; background: rgba(255,209,94,.14); color: #ffd95e; border: 1px solid rgba(255,209,94,.3); border-radius: 999px; font-size: 12px; font-weight: 700; padding: 6px 12px; cursor: pointer; }
.support-btn:hover { background: rgba(255,209,94,.24); }
.modal.support .tip-btn { display: block; text-align: center; background: linear-gradient(135deg, #ffd95e, #f5a623); color: #3a2b00; font-weight: 800; padding: 13px; border-radius: 12px; margin: 6px 0 16px; }
.modal.support .tip-btn:hover { filter: brightness(1.05); text-decoration: none; }
.crypto-box { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 14px; margin-bottom: 10px; }
.crypto-box .c-label { font-weight: 700; margin-bottom: 10px; }
.crypto-box .c-qr { display: block; width: 150px; height: 150px; margin: 0 auto 12px; background: #fff; border-radius: 8px; padding: 6px; box-sizing: border-box; }
.c-addr-row { display: flex; gap: 8px; align-items: stretch; }
.c-addr { flex: 1; font-size: 12px; word-break: break-all; background: rgba(0,0,0,.28); padding: 9px 10px; border-radius: 8px; color: var(--text); font-family: ui-monospace, monospace; }
.c-addr-row .acc-btn { white-space: nowrap; }
