/* ============================
   HEDVION GAMES — Brand Tokens (playful variant)
   ============================ */
:root {
  --bg: #fbf8f3;
  --bg-alt: #f3ede2;
  --bg-dark: #1d1815;
  --ink: #2d2422;
  --ink-soft: #5a4f4a;
  --line: #e6dfd2;
  --accent: #a87340;
  --accent-2: #c08654;
  --accent-purple: #7b5fa8;
  --accent-mint: #56a98c;
  --accent-pink: #d96f8e;
  --accent-glow: rgba(168, 115, 64, 0.18);
  --shadow-sm: 0 1px 2px rgba(45, 36, 34, 0.06);
  --shadow-md: 0 6px 24px rgba(45, 36, 34, 0.08);
  --shadow-lg: 0 18px 50px rgba(45, 36, 34, 0.12);
  --shadow-pop: 6px 6px 0 rgba(45, 36, 34, 0.92);
  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --maxw: 1200px;
  --pad: clamp(20px, 4vw, 40px);
  --font-sans: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', system-ui, sans-serif;
  --font-display: 'Black Han Sans', 'Pretendard', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; transition: color .18s ease; }

.container {
  width: min(100%, var(--maxw));
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* ===== Sparkle decorations (background) ===== */
body::before, body::after {
  content: '';
  position: fixed;
  pointer-events: none;
  z-index: 0;
}
body::before {
  top: 12%; left: 4%;
  width: 18px; height: 18px;
  background: var(--accent-purple);
  border-radius: 50%;
  opacity: 0.25;
  box-shadow:
    180px 80px 0 -3px var(--accent-mint),
    340px -40px 0 -5px var(--accent-pink),
    520px 220px 0 -2px var(--accent),
    -10px 360px 0 -4px var(--accent-purple);
}
body::after {
  bottom: 8%; right: 6%;
  width: 14px; height: 14px;
  background: var(--accent-mint);
  border-radius: 50%;
  opacity: 0.3;
  box-shadow:
    -260px 60px 0 -3px var(--accent-pink),
    -480px -180px 0 -5px var(--accent),
    -120px -300px 0 -2px var(--accent-purple);
}

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251, 248, 243, 0.92);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 96px;
}
.brand {
  display: flex; align-items: center; gap: 14px;
}
.brand img {
  height: 56px;
  width: auto;
  margin: -10px -8px;
  transition: transform .25s cubic-bezier(.4,1.6,.5,1);
}
.brand:hover img { transform: rotate(-8deg) scale(1.08); }
.brand-suffix {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 0.04em;
  border-left: 2px dashed var(--line);
  padding-left: 16px;
  line-height: 1;
}
.nav {
  display: flex; gap: 28px;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
}
.nav a:hover { color: var(--accent); }

/* === Locale switcher === */
.locale-switcher {
  display: flex;
  gap: 4px;
  margin-left: 8px;
  padding-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}
.locale-btn {
  width: 32px;
  height: 32px;
  font-size: 17px;
  padding: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid transparent;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s, border-color 0.12s, background 0.12s, box-shadow 0.12s;
  line-height: 1;
  color: inherit;
}
.locale-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--accent, #88ddee);
  transform: scale(1.12);
}
.locale-btn.active {
  background: rgba(255, 204, 102, 0.2);
  border-color: var(--accent, #ffcc66);
  box-shadow: 0 0 10px rgba(255, 204, 102, 0.35);
  transform: scale(1.08);
}
@media (max-width: 640px) {
  .locale-switcher { gap: 2px; padding-left: 8px; margin-left: 4px; }
  .locale-btn { width: 28px; height: 28px; font-size: 14px; }
}

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 100px 0 96px;
  overflow: hidden;
  border-bottom: 2px solid var(--ink);
}
.hero .container { position: relative; z-index: 2; }
.hero .eyebrow {
  display: inline-flex;
  align-items: center; gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 22px;
  background: var(--bg);
  border: 2px solid var(--accent);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
}
.hero .eyebrow::before { content: '🎮'; }
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--ink);
  max-width: 900px;
}
.hero h1 .accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-purple) 50%, var(--accent-pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
  position: relative;
}
.hero h1 .accent::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 8px;
  background: var(--accent-mint);
  opacity: 0.4;
  z-index: -1;
  border-radius: 4px;
  transform: skew(-2deg);
}
.hero .lead {
  margin-top: 26px;
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 540px;
  line-height: 1.6;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 80% 20%, var(--accent-glow), transparent 55%),
    radial-gradient(ellipse at 20% 80%, rgba(123, 95, 168, 0.12), transparent 55%);
  z-index: 1;
}
.hero-mascot {
  position: absolute;
  top: 50%; right: clamp(-30px, 2vw, 60px);
  width: clamp(140px, 22vw, 280px);
  z-index: 2;
  pointer-events: none;
  animation: hedgehogBob 3.2s ease-in-out infinite;
  filter: drop-shadow(0 12px 30px rgba(45, 36, 34, 0.18));
}
@keyframes hedgehogBob {
  0%, 100% { transform: translateY(-50%) rotate(-6deg); }
  50%      { transform: translateY(-58%) rotate(-4deg); }
}
.hero-emojis {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.hero-emojis span {
  position: absolute;
  font-size: 28px;
  animation: float 4s ease-in-out infinite;
}
.hero-emojis span:nth-child(1) { top: 20%; left: 8%; animation-delay: 0s; }
.hero-emojis span:nth-child(2) { top: 65%; left: 12%; animation-delay: 0.7s; font-size: 22px; }
.hero-emojis span:nth-child(3) { top: 30%; right: 30%; animation-delay: 1.4s; font-size: 20px; }
.hero-emojis span:nth-child(4) { bottom: 18%; left: 45%; animation-delay: 2.1s; font-size: 24px; }
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50%      { transform: translateY(-12px) rotate(5deg); }
}

/* ===== Games ===== */
.games {
  padding: 80px 0 32px;
  position: relative; z-index: 2;
}
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 32px;
  gap: 16px;
}
.games h2,
.coming-soon h2 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.section-count {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--accent);
  background: var(--bg-alt);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--accent);
}

.coming-soon {
  padding: 40px 0 100px;
  border-top: 1px dashed var(--line);
  margin-top: 56px;
  position: relative; z-index: 2;
}
.coming-soon h2 {
  font-size: 24px;
  margin-bottom: 8px;
}
.muted { color: var(--ink-soft); font-size: 14px; }

/* ===== Card grid (comic book panel feel) ===== */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
  justify-content: center;
}
.game-grid:has(> :only-child) { display: flex; justify-content: center; }
.game-grid:has(> :only-child) > .game-card { max-width: 360px; }
.game-card {
  --accent-card: var(--accent);
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .22s cubic-bezier(.4,1.4,.5,1), box-shadow .22s ease;
  position: relative;
  box-shadow: var(--shadow-pop);
}
.game-card:nth-child(2n)   { transform: rotate(0.6deg); }
.game-card:nth-child(3n)   { transform: rotate(-0.5deg); }
.game-card:nth-child(4n+1) { transform: rotate(0.3deg); }
.game-card:hover {
  transform: rotate(0deg) translate(-3px, -6px);
  box-shadow: 9px 9px 0 rgba(45, 36, 34, 0.92);
}
.game-card.status-coming {
  pointer-events: none;
  opacity: 0.55;
}
.card-thumb {
  aspect-ratio: 16 / 10;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--accent-card) 30%, var(--bg-alt)),
    var(--bg-alt));
  position: relative;
  overflow: hidden;
  border-bottom: 3px solid var(--ink);
}
.card-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 25% 30%, rgba(255,255,255,0.6), transparent 40%),
    repeating-linear-gradient(45deg, transparent 0 8px, rgba(255,255,255,0.04) 8px 16px);
  pointer-events: none;
}
.card-thumb img {
  width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1;
}
.thumb-emoji {
  font-size: 110px;
  position: relative; z-index: 1;
  filter: drop-shadow(0 8px 16px rgba(45, 36, 34, 0.25));
  animation: thumbBob 2.5s ease-in-out infinite;
}
@keyframes thumbBob {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50%      { transform: translateY(-6px) rotate(3deg); }
}
.card-body {
  padding: 22px 24px 24px;
  display: flex; flex-direction: column;
  gap: 12px;
  flex: 1;
}
.card-title-row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px;
}
.card-title-row h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--ink);
  line-height: 1.15;
}
.subtitle {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  white-space: nowrap;
}
.card-desc {
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.55;
}
.card-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 4px;
}
.tag {
  font-size: 11px;
  font-weight: 700;
  background: var(--bg-alt);
  border: 1.5px solid var(--ink);
  color: var(--ink);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.02em;
}
.card-cta {
  margin-top: 6px;
  padding-top: 10px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  color: var(--accent);
  display: inline-flex; align-items: center; gap: 4px;
  border-top: 1.5px dashed var(--line);
}
.card-cta::after {
  content: '→';
  transition: transform .18s ease;
  margin-left: auto;
}
.game-card:hover .card-cta::after {
  transform: translateX(6px);
}

/* ===== Footer ===== */
.site-footer {
  padding: 40px 0 56px;
  border-top: 2px solid var(--ink);
  text-align: center;
  color: var(--ink-soft);
  font-size: 13px;
  position: relative; z-index: 2;
  background: var(--bg-alt);
}
.site-footer p { font-weight: 500; }

/* ===== Responsive ===== */
@media (max-width: 720px) {
  .site-header .container { height: 76px; }
  .brand img { height: 44px; }
  .brand-suffix { font-size: 18px; padding-left: 12px; }
  .hero { padding: 64px 0 56px; }
  .hero-mascot { width: 130px; right: -10px; opacity: 0.7; }
  .games { padding: 56px 0 24px; }
  .game-grid { grid-template-columns: 1fr; gap: 18px; }
  .game-card { transform: rotate(0deg) !important; }
}

/* ============================
   Ad Blocks
   ============================ */
.ad-block {
  padding: 16px 0;
  overflow: hidden;
}
.ad-label {
  font-size: 11px;
  color: var(--ink-soft);
  opacity: 0.6;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 6px;
}
.ad-ali {
  margin-bottom: 12px;
  border-radius: 8px;
  overflow: hidden;
}

/* AdSense unfilled 처리 — ins 자체만 hide. 사이드레일 액자는 유지 */
.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }
.ad-block:has(.adsbygoogle[data-ad-status="unfilled"]):not(:has(.adsbygoogle[data-ad-status="filled"])) { min-height: 0; padding: 0; }

/* 좌/우 sticky 사이드 광고 (1620px+) — unfilled 라도 액자 영역은 보임 */
.site-rail {
  position: fixed;
  top: 100px;
  width: 160px;
  height: 600px;
  z-index: 5;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  border: 1px dashed rgba(0,0,0,0.08);
  border-radius: 8px;
}
.site-rail--left  { left: 16px; }
.site-rail--right { right: 16px; }
@media (max-width: 1620px) {
  .site-rail { display: none; }
}
