/* Little Drizzle — site styles
 * 콘셉트: "밤에 내리는 이슬비". 다크 네이비 헤더/히어로/푸터가 밝은 본문을
 * 감싸는 샌드위치 구조. 게임 카드는 games.json의 accent를 --g로 받아 쓴다. */
:root {
  --bg: #f6f9fd;
  --surface: #ffffff;
  --ink: #16233b;
  --ink-soft: #5a6b7d;
  --ink-faint: #8a99a8;
  --line: #e3eaf2;
  --accent: #4a90d9;
  --accent-deep: #2f6bb0;
  --night: #0f1d38;
  --night-2: #1c3560;
  --night-3: #2f5c9e;
  --radius: 16px;
  --shadow: 0 2px 12px rgba(22, 35, 59, 0.07);
  --shadow-lift: 0 14px 34px rgba(22, 35, 59, 0.16);
  --maxw: 1040px;
  --font-display: "Outfit", -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Noto Sans KR", "Segoe UI", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

img { max-width: 100%; display: block; }

::selection { background: rgba(74, 144, 217, 0.28); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

h1, h2, h3, .brand, .btn { font-family: var(--font-display); }
h1, h2, h3 { word-break: keep-all; }

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

/* ---------- header (다크 글래스) ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 29, 56, 0.88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 17.5px;
  letter-spacing: 0.2px;
  color: #fff;
}
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3)); }

.site-nav { display: flex; gap: 2px; }
.site-nav a {
  position: relative;
  padding: 8px 13px;
  border-radius: 9px;
  color: rgba(224, 236, 250, 0.78);
  font-size: 14.5px;
  font-weight: 600;
}
.site-nav a:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  text-decoration: none;
}
.site-nav a.active { color: #fff; }
.site-nav a.active::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 3px;
  height: 2.5px;
  border-radius: 2px;
  background: linear-gradient(90deg, #6db3f2, #9cc3f0);
}

/* ---------- hero (밤비 내리는 하늘) ---------- */
.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  color: #fff;
  padding: 88px 0 130px;
  background:
    radial-gradient(ellipse 55% 60% at 78% -12%, rgba(126, 178, 241, 0.35), transparent 70%),
    radial-gradient(ellipse 70% 55% at 18% 108%, rgba(74, 144, 217, 0.28), transparent 72%),
    linear-gradient(180deg, var(--night) 0%, var(--night-2) 58%, var(--night-3) 125%);
}

/* 빗줄기 3겹 — 타일마다 타원형 빗방울 한 줄기씩. 타일 높이가 서로 달라
 * 낙하 속도가 달라 보인다. 600px은 세 타일 높이(100/150/200)의 공배수라
 * 루프가 끊기지 않는다. */
.rain {
  position: absolute;
  inset: -160px -80px;
  pointer-events: none;
  transform: rotate(8deg);
}
.rain.r1 {
  background-image: radial-gradient(1.5px 28px at 25px 45px,
    rgba(190, 218, 252, 0.55) 30%, transparent 100%);
  background-size: 60px 100px;
  animation: rainfall 1s linear infinite;
}
.rain.r2 {
  background-image: radial-gradient(1.8px 36px at 60px 90px,
    rgba(168, 205, 250, 0.38) 30%, transparent 100%);
  background-size: 95px 150px;
  animation: rainfall 1.6s linear infinite;
}
.rain.r3 {
  background-image: radial-gradient(2.2px 46px at 40px 120px,
    rgba(168, 205, 250, 0.22) 30%, transparent 100%);
  background-size: 130px 200px;
  animation: rainfall 2.4s linear infinite;
}
@keyframes rainfall {
  to { background-position-y: 600px; }
}

.hero-inner { position: relative; z-index: 1; }

.hero-logo {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.35));
  animation: bob 4.2s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 5.5vw, 48px);
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.25;
  text-shadow: 0 4px 22px rgba(0, 0, 0, 0.35);
}
.hero p {
  margin: 0 auto;
  max-width: 560px;
  color: rgba(219, 233, 250, 0.88);
  font-size: clamp(15px, 2.5vw, 17.5px);
}

.hero-cta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

/* 히어로 하단 물결 — 본문 배경색으로 이어진다 */
.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 70px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 120' preserveAspectRatio='none'%3E%3Cpath d='M0 70 C 240 110 480 20 720 55 C 960 90 1200 30 1440 65 L 1440 120 L 0 120 Z' fill='%23f6f9fd'/%3E%3C/svg%3E") bottom / 100% 100% no-repeat;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.1px;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn.primary {
  background: linear-gradient(135deg, #5b9ce4, var(--accent-deep));
  color: #fff;
  box-shadow: 0 8px 22px rgba(31, 82, 141, 0.45);
}
.btn.primary:hover { box-shadow: 0 12px 28px rgba(31, 82, 141, 0.55); }
.btn.ghost {
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}
.btn.ghost:hover { background: rgba(255, 255, 255, 0.15); }

/* ---------- sections ---------- */
.section { padding: 56px 0; }

.eyebrow {
  display: block;
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.section h2 {
  margin: 0 0 8px;
  font-size: clamp(22px, 3.5vw, 28px);
  font-weight: 800;
  letter-spacing: -0.4px;
}
.section h2::after {
  content: "";
  display: block;
  width: 34px;
  height: 3.5px;
  margin-top: 10px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), #8fc0ee);
}
.section-head { margin-bottom: 26px; }
.section-sub { color: var(--ink-soft); margin: 8px 0 0; font-size: 14.5px; }

/* ---------- game cards ---------- */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}

.game-card {
  --g: var(--accent);
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  color: var(--ink);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.game-card:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--g) 45%, var(--line));
  box-shadow: 0 18px 38px color-mix(in srgb, var(--g) 22%, rgba(22, 35, 59, 0.1));
  text-decoration: none;
}
.game-card .thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: color-mix(in srgb, var(--g) 18%, #0f1d38);
}
.game-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.game-card:hover .thumb img { transform: scale(1.05); }
.game-card .thumb .badge {
  position: absolute;
  top: 12px;
  left: 12px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}
.game-card .body { padding: 18px 20px 6px; flex: 1; }
.game-card h3 {
  margin: 0 0 6px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.2px;
}
.game-card .tagline { margin: 0 0 6px; color: var(--ink-soft); font-size: 14px; }
.game-card .genre {
  display: inline-block;
  margin: 0;
  color: color-mix(in srgb, var(--g) 72%, var(--ink));
  background: color-mix(in srgb, var(--g) 10%, #fff);
  border: 1px solid color-mix(in srgb, var(--g) 22%, #fff);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
}
.game-card .test-chip {
  display: inline-block;
  margin: 0 0 0 6px;
  color: color-mix(in srgb, var(--g) 66%, var(--ink));
  background: #fff;
  border: 1px dashed color-mix(in srgb, var(--g) 45%, #fff);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
}
.game-card .more {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 20px 18px;
  font-size: 13.5px;
  font-weight: 700;
  font-family: var(--font-display);
  color: color-mix(in srgb, var(--g) 78%, var(--ink));
}
.game-card .more .arrow { transition: transform 0.22s ease; }
.game-card:hover .more .arrow { transform: translateX(5px); }

/* ---------- status badge ---------- */
.badge {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.7;
  white-space: nowrap;
  vertical-align: middle;
}
.badge.dev   { background: #ffedc2; color: #8a5d00; }
.badge.beta  { background: #e5e0ff; color: #5b48c7; }
.badge.live  { background: #c9f0d9; color: #156b3b; }
.badge.ended { background: #ececec; color: #777; }

/* ---------- news list ---------- */
.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li { border-bottom: 1px solid var(--line); }
.news-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 10px;
  border-radius: 10px;
  color: var(--ink);
  transition: background 0.15s ease, transform 0.15s ease;
}
.news-list a:hover {
  background: #ecf3fb;
  transform: translateX(4px);
  text-decoration: none;
}
.news-list .pin { font-size: 12px; }
.news-list .tag {
  flex-shrink: 0;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent-deep);
  background: #e3effb;
  border-radius: 6px;
  padding: 2px 9px;
}
.news-list .title {
  flex: 1;
  min-width: 0; /* nowrap 제목이 flex 최소폭을 키워 모바일 가로 오버플로를 만드는 것 방지 */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14.5px;
  font-weight: 500;
}
.news-list .date {
  flex-shrink: 0;
  color: var(--ink-faint);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.news-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.news-filter button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 6px 15px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
}
.news-filter button:hover { border-color: var(--accent); color: var(--accent-deep); }
.news-filter button.active {
  background: linear-gradient(135deg, #5b9ce4, var(--accent-deep));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px rgba(47, 107, 176, 0.35);
}

/* ---------- article (news detail / privacy) ---------- */
.article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 34px clamp(20px, 4vw, 44px);
}
.article h1 { font-size: 25px; margin-top: 0; letter-spacing: -0.4px; }
.article h2 { font-size: 19px; margin-top: 1.9em; }
.article h3 { font-size: 16px; }
.article .meta { color: var(--ink-faint); font-size: 13px; margin-bottom: 24px; }
.article .tag {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent-deep);
  background: #e3effb;
  border-radius: 6px;
  padding: 2px 9px;
}
.article code {
  background: #eef3f8;
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.9em;
}
.article blockquote {
  margin: 1em 0;
  padding: 4px 18px;
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  color: var(--ink-soft);
  background: #f2f7fc;
}

/* ---------- game detail ---------- */
.game-hero {
  --g: var(--accent);
  position: relative;
  border-radius: calc(var(--radius) + 4px);
}
.game-hero .cover {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  border-radius: calc(var(--radius) + 4px);
  box-shadow:
    0 24px 50px color-mix(in srgb, var(--g) 30%, rgba(22, 35, 59, 0.14)),
    0 4px 14px rgba(22, 35, 59, 0.1);
}
.game-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
}
.game-head h1 {
  margin: 0;
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 800;
  letter-spacing: -0.5px;
}
.game-head .genre { color: var(--ink-soft); font-size: 14px; }
.game-page .tagline { color: var(--ink-soft); font-size: 16px; margin: 6px 0 0; }

.game-page h2 {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.3px;
  margin: 44px 0 16px;
}
.game-page h2::after {
  content: "";
  display: block;
  width: 28px;
  height: 3px;
  margin-top: 8px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--g, var(--accent)), transparent);
}

.store-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 6px; }
.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-display);
  background: var(--night);
  color: #fff;
  box-shadow: 0 4px 14px rgba(15, 29, 56, 0.25);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.store-btn svg { width: 17px; height: 17px; fill: currentColor; }
.store-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 29, 56, 0.32);
  text-decoration: none;
}
.store-btn.web { background: linear-gradient(135deg, #5b9ce4, var(--accent-deep)); }
.store-btn.test {
  background: color-mix(in srgb, var(--g, var(--accent)) 10%, #fff);
  color: color-mix(in srgb, var(--g, var(--accent)) 66%, var(--ink));
  border: 1.5px dashed color-mix(in srgb, var(--g, var(--accent)) 55%, #fff);
  box-shadow: none;
}
.store-btn.test:hover {
  background: color-mix(in srgb, var(--g, var(--accent)) 18%, #fff);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--g, var(--accent)) 28%, transparent);
}
.store-btn.disabled {
  background: #eef2f6;
  color: #9aa8b6;
  pointer-events: none;
  border: 1px dashed #ccd7e2;
  box-shadow: none;
}

.shots {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 8px 4px 18px;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}
.shots img {
  height: 340px;
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: 0 10px 26px rgba(22, 35, 59, 0.14);
  scroll-snap-align: start;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}
.shots img:hover { transform: translateY(-4px); }

.game-desc { max-width: 720px; white-space: pre-line; font-size: 15.5px; }

/* ---------- support form ---------- */
.support-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px clamp(20px, 4vw, 38px);
  max-width: 640px;
}
.support-card label {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  margin: 20px 0 7px;
}
.support-card label:first-of-type { margin-top: 0; }
.support-card select,
.support-card input,
.support-card textarea {
  width: 100%;
  border: 1.5px solid #cfdae5;
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 14.5px;
  font-family: inherit;
  background: #fbfdff;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.support-card select:focus,
.support-card input:focus,
.support-card textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.22);
}
.support-card textarea { min-height: 150px; resize: vertical; }
.support-card .hint { font-size: 12.5px; color: var(--ink-faint); margin-top: 5px; }
.support-submit {
  margin-top: 26px;
  width: 100%;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #5b9ce4, var(--accent-deep));
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-display);
  padding: 14px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(47, 107, 176, 0.35);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.support-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(47, 107, 176, 0.45);
}

/* ---------- footer (다크) ---------- */
.site-footer {
  margin-top: 72px;
  position: relative;
  background: linear-gradient(180deg, var(--night-2), var(--night) 60%);
  color: rgba(219, 233, 250, 0.75);
  padding: 0 0 34px;
  font-size: 13.5px;
}
.site-footer::before {
  content: "";
  display: block;
  height: 56px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 120' preserveAspectRatio='none'%3E%3Cpath d='M0 70 C 240 110 480 20 720 55 C 960 90 1200 30 1440 65 L 1440 0 L 0 0 Z' fill='%23f6f9fd'/%3E%3C/svg%3E") top / 100% 100% no-repeat;
  margin-bottom: 26px;
}
.site-footer a { color: rgba(224, 236, 250, 0.9); }
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer-brand img { width: 26px; height: 26px; }
.footer-brand .name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  color: #fff;
}
.footer-brand .tagline { font-size: 12.5px; color: rgba(219, 233, 250, 0.55); }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.footer-copy {
  width: 100%;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12.5px;
  color: rgba(219, 233, 250, 0.45);
}

.bug-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 8px 18px;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  transition: background 0.15s ease, transform 0.15s ease;
}
.bug-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
  text-decoration: none;
}
/* 본문(밝은 배경)에 놓이는 버그 버튼 */
main .bug-btn {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
  box-shadow: var(--shadow);
}
main .bug-btn:hover { border-color: var(--accent); }

.empty { color: var(--ink-faint); font-size: 14px; padding: 24px 0; text-align: center; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 18px;
  font-size: 13.5px;
  font-weight: 600;
}

.more-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-weight: 700;
  font-size: 14px;
  font-family: var(--font-display);
}

/* ---------- scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.in { opacity: 1; transform: none; }
.game-grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.game-grid .reveal:nth-child(3) { transition-delay: 0.16s; }

/* ---------- responsive / motion ---------- */
@media (max-width: 640px) {
  .site-nav a { padding: 7px 9px; font-size: 13.5px; }
  .brand span { display: none; }
  .shots img { height: 250px; }
  .hero { padding: 60px 0 104px; }
  .hero-logo { width: 52px; height: 52px; }
  .section { padding: 40px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rain, .hero-logo { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: 0.01ms !important; }
}
