/* =====================================================
   stories.css  |  이야기 모음  |  Retro 90s Korea
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;700;900&family=Press+Start+2P&family=Nanum+Gothic:wght@400;700&display=swap');

/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background-color: #0a0a2e;
  background-image:
    radial-gradient(white 1px, transparent 1px),
    radial-gradient(white 1px, transparent 1px);
  background-size: 40px 40px, 80px 80px;
  background-position: 0 0, 20px 20px;
  color: #1a1a1a;
  font-family: 'Nanum Gothic', 'Noto Sans KR', sans-serif;
  min-height: 100vh;
}

/* ── BLINK ANIMATION ── */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}
.blink { animation: blink 1s step-start infinite; }

/* ── HEADER ── */
header {
  background: linear-gradient(180deg, #c0001a 0%, #e8001f 40%, #ff6b6b 100%);
  border-bottom: 6px double #ffd700;
  text-align: center;
  padding: 0;
}

.header-deco {
  background: #ffd700;
  color: #c0001a;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.55rem;
  padding: 4px 0;
  letter-spacing: 2px;
  overflow: hidden;
  white-space: nowrap;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 20px 16px 12px;
}

.hangul-side {
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 900;
  font-size: 1.6rem;
  color: #ffd700;
  text-shadow: 2px 2px 0 #7a0010, -1px -1px 0 #7a0010;
  line-height: 1.3;
  letter-spacing: 4px;
  min-width: 40px;
}

.header-center { flex: 1; max-width: 600px; }

.site-title {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(1rem, 3vw, 1.6rem);
  color: #ffd700;
  text-shadow: 3px 3px 0 #7a0010, -2px -2px 0 #ff9999;
  letter-spacing: 3px;
  margin-bottom: 6px;
}

.site-subtitle {
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 1rem;
  color: #ffe8e8;
  letter-spacing: 6px;
  margin-bottom: 8px;
}

.pixel-divider {
  font-family: monospace;
  color: #ffd700;
  font-size: 0.85rem;
  letter-spacing: 2px;
  margin: 6px 0;
}

.header-desc {
  color: #fff0f0;
  font-size: 0.9rem;
  line-height: 1.6;
}

.small-hangul {
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 0.8rem;
  color: #ffd700;
}

/* ── MARQUEE ── */
.marquee-bar {
  background: #001a6e;
  color: #ffd700;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.55rem;
  padding: 6px 0;
  border-top: 3px solid #ffd700;
  border-bottom: 3px solid #ffd700;
  letter-spacing: 2px;
}

/* ── NAV ── */
nav {
  background: #001a6e;
  border-bottom: 4px double #ffd700;
  text-align: center;
  padding: 10px 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

nav a {
  color: #ffd700;
  text-decoration: none;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.55rem;
  padding: 5px 10px;
  border: 2px solid #ffd700;
  background: transparent;
  transition: background 0.15s, color 0.15s;
  letter-spacing: 1px;
}

nav a:hover, nav a.active {
  background: #ffd700;
  color: #001a6e;
}

.nav-sep {
  color: #4466cc;
  font-size: 1rem;
}

/* ── MAIN ── */
main {
  max-width: 1100px;
  margin: 30px auto;
  padding: 0 16px 40px;
}

/* ── SECTION TITLE ── */
.section-title {
  text-align: center;
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(0.7rem, 2vw, 1rem);
  color: #ffd700;
  text-shadow: 2px 2px 0 #001a6e;
  background: #001a6e;
  border: 4px double #ffd700;
  padding: 14px 20px 10px;
  margin-bottom: 28px;
  letter-spacing: 3px;
}

.deco-char { color: #c0001a; font-size: 1.2em; }

.section-hangul {
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 0.85rem;
  color: #aabbff;
  margin-top: 6px;
  letter-spacing: 8px;
  font-weight: 400;
}

/* ── CARD GRID ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

/* ── STORY CARD ── */
.story-card {
  background: #fffdf0;
  border: 4px solid #c0001a;
  box-shadow: 6px 6px 0 #7a0010, inset 0 0 0 2px #ffd700;
  padding: 20px 18px 16px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.15s, box-shadow 0.15s;
}

.story-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 9px 9px 0 #7a0010, inset 0 0 0 2px #ffd700;
}

.card-blue  { border-color: #001a6e; box-shadow: 6px 6px 0 #000d3a, inset 0 0 0 2px #4466cc; }
.card-blue:hover  { box-shadow: 9px 9px 0 #000d3a, inset 0 0 0 2px #4466cc; }
.card-gold  { border-color: #b8860b; box-shadow: 6px 6px 0 #7a5800, inset 0 0 0 2px #ffd700; }
.card-gold:hover  { box-shadow: 9px 9px 0 #7a5800, inset 0 0 0 2px #ffd700; }

/* Badge */
.card-badge {
  position: absolute;
  top: -14px;
  right: 14px;
  background: #c0001a;
  color: #ffd700;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.45rem;
  padding: 4px 8px;
  border: 2px solid #ffd700;
  letter-spacing: 1px;
}
.badge-blue { background: #001a6e; }
.badge-gold { background: #b8860b; color: #fff; }

.card-deco-top, .card-deco-bottom {
  text-align: center;
  color: #c0001a;
  font-size: 0.85rem;
  letter-spacing: 4px;
}
.card-blue .card-deco-top, .card-blue .card-deco-bottom { color: #001a6e; }
.card-gold .card-deco-top, .card-gold .card-deco-bottom { color: #b8860b; }

.card-hangul {
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 0.75rem;
  color: #888;
  letter-spacing: 4px;
  text-align: center;
}

.card-title {
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 900;
  font-size: 1.15rem;
  color: #1a1a1a;
  text-align: center;
  line-height: 1.3;
}

.card-genre {
  text-align: center;
  font-size: 0.78rem;
  color: #555;
  letter-spacing: 1px;
}

.card-desc {
  font-size: 0.88rem;
  color: #333;
  line-height: 1.65;
  flex: 1;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 0.72rem;
  color: #666;
}

/* Read Button */
.read-btn {
  display: block;
  text-align: center;
  background: #c0001a;
  color: #ffd700;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.5rem;
  padding: 9px 12px;
  text-decoration: none;
  border: 3px solid #ffd700;
  letter-spacing: 2px;
  margin-top: 4px;
  transition: background 0.15s, color 0.15s;
}
.read-btn:hover { background: #ffd700; color: #c0001a; }

.btn-blue { background: #001a6e; }
.btn-blue:hover { background: #ffd700; color: #001a6e; }

.btn-gold { background: #b8860b; }
.btn-gold:hover { background: #ffd700; color: #7a5800; }

/* ── NOTICE BOX ── */
.notice-box {
  background: #001a6e;
  color: #ffd700;
  border: 3px dashed #ffd700;
  padding: 12px 18px;
  font-size: 0.82rem;
  text-align: center;
  line-height: 1.7;
  letter-spacing: 0.5px;
}

/* ── FOOTER ── */
footer {
  background: linear-gradient(180deg, #001a6e 0%, #000d3a 100%);
  border-top: 6px double #ffd700;
  text-align: center;
  padding: 0;
}

.footer-deco {
  background: #ffd700;
  color: #001a6e;
  font-family: monospace;
  font-size: 0.7rem;
  padding: 4px 0;
  letter-spacing: 2px;
  overflow: hidden;
  white-space: nowrap;
}

.footer-content {
  padding: 20px 16px;
  color: #aabbff;
}

.footer-hangul {
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 1.4rem;
  font-weight: 900;
  color: #ffd700;
  letter-spacing: 6px;
  margin-bottom: 8px;
}

.footer-content p {
  font-size: 0.85rem;
  margin: 4px 0;
  color: #ccd6ff;
}

.footer-small { font-size: 0.72rem !important; color: #8899cc !important; }

.footer-stars {
  color: #ffd700;
  font-size: 0.8rem;
  letter-spacing: 3px;
  padding: 6px 0;
  background: #000d3a;
  overflow: hidden;
  white-space: nowrap;
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .hangul-side { display: none; }
  .card-grid   { grid-template-columns: 1fr; }
  nav { gap: 6px; }
  nav a { font-size: 0.45rem; padding: 4px 7px; }
}
