:root {
  --bg: #0c1020;
  --bg-2: #121a2f;
  --panel: #171f36;
  --panel-2: #1e2844;
  --text: #eef2ff;
  --muted: #9aa4c4;
  --line: #2a3556;
  --accent: #7c8cff;
  --accent-2: #b58cff;
  --warn: #ffb4a2;
  --radius: 14px;
  --gap: 20px;
  --max: 1200px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1000px 500px at 0% -10%, #1f2d5c 0%, transparent 60%),
    radial-gradient(900px 500px at 100% 0%, #2c1d56 0%, transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

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

/* 상단 바 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(12, 16, 32, 0.86);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .inner { max-width: var(--max); margin: 0 auto; padding: 14px 20px; }
.brand { font-weight: 800; letter-spacing: 0.06em; text-decoration: none; }

.sample-banner {
  background: #3a2d12;
  color: #ffd98a;
  text-align: center;
  padding: 8px 12px;
  font-size: 0.9rem;
}

main {
  flex: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px 20px 56px;
}

/* 목록 화면 */
.hero { padding: 24px 0 8px; }
.eyebrow { margin: 0; color: var(--accent); font-weight: 700; letter-spacing: 0.18em; font-size: 0.78rem; }
.hero h1 { margin: 0.3rem 0 0.4rem; font-size: clamp(1.6rem, 4vw, 2.6rem); line-height: 1.25; }
.sub { margin: 0; color: var(--muted); }

.toolbar { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 8px; }
.toolbar > * { flex: 1 1 220px; }
.count { margin: 8px 0 14px; color: var(--muted); font-size: 0.9rem; }

input, textarea, select {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.grid { display: grid; gap: var(--gap); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 481px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 901px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1281px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card {
  min-width: 0;
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.card:hover, .card:focus-within {
  transform: translateY(-4px);
  border-color: #4a5aa8;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35);
}
.card > a { display: block; height: 100%; text-decoration: none; }

.thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, hsl(var(--h, 220) 60% 42%), hsl(calc(var(--h, 220) + 70) 55% 26%));
}
.thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.card:hover .thumb img { transform: scale(1.04); }
.thumb-id {
  position: absolute;
  left: 10px;
  bottom: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  font-size: 0.75rem;
}

.card-body { padding: 14px 16px 18px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; min-height: 4px; }
.tag, .chip {
  font-size: 0.78rem;
  color: #d3dbff;
  border: 1px solid #3a4680;
  border-radius: 999px;
  padding: 1px 10px;
}
.card-title { margin: 8px 0 2px; font-size: 1.05rem; line-height: 1.35; }
.card-creator { margin: 0; color: var(--muted); font-size: 0.88rem; }
.summary {
  margin: 8px 0 0;
  color: #c9d1ee;
  font-size: 0.92rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.empty { padding: 48px 0; text-align: center; color: var(--muted); }
.loading { padding: 60px 0; text-align: center; color: var(--muted); }

/* 상세 화면 */
.back { display: inline-block; margin-bottom: 14px; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--text); }
.detail-head h1 { margin: 6px 0 4px; font-size: clamp(1.5rem, 3.5vw, 2.2rem); line-height: 1.3; }
.creator { margin: 0 0 10px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }

.grid-2 { display: grid; gap: var(--gap); grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 861px) { .grid-2 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } }

.media { margin-bottom: var(--gap); }
.media .thumb { border: 1px solid var(--line); border-radius: var(--radius); }
.video {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #000;
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.media-actions { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 10px; }

.panel {
  margin-bottom: var(--gap);
  padding: 20px 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.panel h2 { margin: 0 0 12px; font-size: 1.1rem; }
.lead { font-size: 1.05rem; color: #dfe5ff; }
.pre { white-space: pre-wrap; }

.facts { margin: 0; }
.facts dt { margin-top: 12px; color: var(--muted); font-size: 0.85rem; }
.facts dt:first-child { margin-top: 0; }
.facts dd { margin: 2px 0 0; }

.shots { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.shots img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.guide { margin: 0 0 14px; padding-left: 18px; color: #dfe5ff; }
.guide li { margin: 4px 0; }

.btn {
  display: inline-block;
  padding: 11px 18px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.secondary { background: transparent; border: 1px solid var(--line); color: var(--text); }

.warn { color: var(--warn); }
.muted { color: var(--muted); }

/* 후기 */
.review-list { list-style: none; margin: 0 0 18px; padding: 0; }
.review { padding: 12px 0; border-top: 1px solid var(--line); }
.review-head { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 0.85rem; }
.review-head strong { color: var(--text); }
.review p { margin: 6px 0 0; white-space: pre-wrap; }
.review-form { display: grid; gap: 10px; }
.review-form label { color: var(--muted); font-size: 0.9rem; }
.form-status { min-height: 1.4em; margin: 0; color: var(--muted); font-size: 0.9rem; }
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 22px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}
.site-footer p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
