* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #0f0f1a; --bg2: #1a1a2e; --card: #16213e;
  --accent: #e94560; --accent2: #7b2cbf;
  --text: #eaeaea; --text-dim: #a0a0b0; --radius: 12px;
}
body { font-family: 'Segoe UI','Noto Sans KR',sans-serif; background: var(--bg); color: var(--text); line-height: 1.7; }
#navbar { position: sticky; top: 0; z-index: 100; background: rgba(15,15,26,0.92); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(255,255,255,0.06); }
.nav-inner { max-width: 1100px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 0.8rem 1.5rem; }
.logo { font-size: 1.3rem; font-weight: 700; color: var(--accent); text-decoration: none; }
.nav-links { display: flex; gap: 1.5rem; }
.nav-links a { color: var(--text-dim); text-decoration: none; font-size: 0.95rem; transition: color 0.2s; }
.nav-links a:hover { color: var(--accent); }
.section { display: none; max-width: 1100px; margin: 0 auto; padding: 2rem 1.5rem 4rem; animation: fadeIn 0.4s ease; }
.section.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.section-title { font-size: 2rem; margin-bottom: 2rem; border-bottom: 2px solid var(--accent); padding-bottom: 0.5rem; }
.hero { text-align: center; padding: 4rem 1rem 2rem; }
.hero h1 { font-size: 2.8rem; margin-bottom: 0.5rem; background: linear-gradient(135deg,var(--accent),var(--accent2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero p { color: var(--text-dim); margin-bottom: 3rem; }
.hero-cards { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 1.5rem; max-width: 800px; margin: 0 auto; }
.hero-card { background: var(--card); border-radius: var(--radius); padding: 2rem 1.5rem; cursor: pointer; transition: transform 0.25s,box-shadow 0.25s; border: 1px solid rgba(255,255,255,0.05); }
.hero-card:hover { transform: translateY(-6px); box-shadow: 0 10px 30px rgba(233,69,96,0.2); }
.hero-icon { font-size: 2.5rem; display: block; margin-bottom: 0.8rem; }
.hero-card h3 { margin-bottom: 0.3rem; }
.hero-card p { font-size: 0.88rem; color: var(--text-dim); }
.world-block { background: var(--card); border-radius: var(--radius); padding: 1.8rem; margin-bottom: 1.5rem; border: 1px solid rgba(255,255,255,0.05); }
.world-block h3 { color: var(--accent); margin-bottom: 0.8rem; font-size: 1.2rem; }
.world-block p { color: var(--text-dim); margin-bottom: 0.5rem; }
.timeline { list-style: none; padding-left: 1rem; border-left: 2px solid var(--accent2); }
.timeline li { padding: 0.5rem 0 0.5rem 1rem; position: relative; }
.timeline li::before { content: ''; position: absolute; left: -7px; top: 0.9rem; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.timeline li strong { color: var(--text); }
.region-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(200px,1fr)); gap: 1rem; margin-top: 1rem; }
.region-card { background: var(--bg2); border-radius: 8px; padding: 1.2rem; border: 1px solid rgba(255,255,255,0.04); }
.region-card h4 { color: var(--accent2); margin-bottom: 0.4rem; }
.region-card p { font-size: 0.88rem; }
.char-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(240px,1fr)); gap: 1.5rem; }
.char-card { background: var(--card); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: transform 0.25s,box-shadow 0.25s; border: 1px solid rgba(255,255,255,0.05); }
.char-card:hover { transform: translateY(-6px); box-shadow: 0 10px 30px rgba(123,44,191,0.25); }
.char-img-placeholder { height: 200px; display: flex; align-items: center; justify-content: center; font-size: 3rem; background: linear-gradient(135deg,var(--bg2),var(--card)); }
.char-card h3 { padding: 0.8rem 1rem 0; }
.char-role { padding: 0 0.3rem 0.3rem 1rem; color: var(--accent); font-size: 0.88rem; font-weight: 600; }
.char-desc { padding: 0 1rem 1rem; color: var(--text-dim); font-size: 0.88rem; }
.gallery-desc { color: var(--text-dim); margin-bottom: 1.5rem; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(220px,1fr)); gap: 1.2rem; }
.gallery-item { background: var(--card); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: transform 0.25s,box-shadow 0.25s; border: 1px solid rgba(255,255,255,0.05); }
.gallery-item:hover { transform: scale(1.03); box-shadow: 0 8px 25px rgba(233,69,96,0.2); }
.gallery-placeholder { height: 180px; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; background: linear-gradient(135deg,var(--card),var(--bg2)); }
.gallery-item p { padding: 0.6rem 1rem; font-size: 0.85rem; color: var(--text-dim); }
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); z-index: 200; justify-content: center; align-items: center; }
.modal.open { display: flex; }
.close { position: absolute; top: 1rem; right: 1.5rem; font-size: 2rem; color: var(--text); cursor: pointer; z-index: 10; }
.modal-content { background: var(--card); border-radius: var(--radius); max-width: 700px; width: 90%; max-height: 85vh; overflow-y: auto; position: relative; padding: 2rem; }
.char-detail { display: flex; gap: 2rem; flex-wrap: wrap; }
.char-detail-img { width: 200px; height: 280px; display: flex; align-items: center; justify-content: center; font-size: 4rem; background: var(--bg2); border-radius: var(--radius); flex-shrink: 0; }
.char-detail-info { flex: 1; min-width: 250px; }
.char-detail-info h2 { color: var(--accent); margin-bottom: 0.3rem; }
.char-detail-role { color: var(--accent2); margin-bottom: 1rem; font-weight: 600; }
.char-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; margin-bottom: 1.5rem; }
.char-stats > div { background: var(--bg2); padding: 0.6rem 0.8rem; border-radius: 8px; font-size: 0.9rem; }
.char-stats strong { display: block; color: var(--accent); font-size: 0.8rem; margin-bottom: 0.2rem; }
.char-stats span { color: var(--text-dim); }
.char-detail-info h4 { color: var(--accent2); margin: 1rem 0 0.3rem; font-size: 1rem; }
.char-detail-info p { color: var(--text-dim); font-size: 0.92rem; }
.lightbox-content { text-align: center; position: relative; }
.lightbox-img { width: min(600px,80vw); height: min(450px,60vh); display: flex; align-items: center; justify-content: center; font-size: 5rem; background: var(--card); border-radius: var(--radius); margin: 0 auto; }
#lightboxCaption { color: var(--text-dim); margin-top: 1rem; }
footer { text-align: center; padding: 2rem; color: var(--text-dim); font-size: 0.85rem; border-top: 1px solid rgba(255,255,255,0.05); }
@media (max-width: 600px) { .hero h1 { font-size: 1.8rem; } .nav-links { gap: 1rem; } .nav-links a { font-size: 0.85rem; } .char-detail { flex-direction: column; } .char-detail-img { width: 100%; height: 200px; } }