/* 1. RESET & VARIABLES */
:root {
    --bg-color: #0f0f12;
    --text-main: #ffffff;
    --text-sub: #a1a1aa;
    --primary: #ff0055; /* Neon Pink */
    --glass-bg: rgba(20, 20, 25, 0.75);
    --glass-solid: rgba(20, 20, 25, 0.95);
    --border: rgba(255, 255, 255, 0.1);
    --card-bg: #18181b;
    /* 다국어 폰트 스택 */
    --font-main: 'Inter', 'Noto Sans KR', 'Noto Sans JP', 'Noto Sans SC', 'Noto Sans TC', sans-serif;
    --container-width: 1100px;
    --header-height: 70px;
    --ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
}

[data-theme="light"] {
    --bg-color: #f8f9fa;
    --text-main: #18181b;
    --text-sub: #52525b;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-solid: rgba(255, 255, 255, 0.98);
    --border: rgba(0, 0, 0, 0.08);
    --card-bg: #ffffff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.3s, color 0.3s;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; }

/* 2. UTILITIES & ANIMATIONS */
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 20px; width: 100%; }

.noise-bg {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1MTIiIGhlaWdodD0iNTEyIj48ZmlsdGVyIGlkPSJnoiPjxmZVR1cmJ1bGVuY2UgdHlwZT0iZnJhY3RhbE5vaXNlIiBiYXNlRnJlcXVlbmN5PSIwLjY1IiBudW1PY3RhdmVzPSIzIiBzdGl0Y2hUaWxlcz0ic3RpdGNoIi8+PC9maWx0ZXI+PHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsdGVyPSJ1cmwoI2cpIiBvcGFjaXR5PSIwLjAzIi8+PC9zdmc+');
    opacity: 0.04; pointer-events: none; z-index: -1;
}

/* 화면 진입 애니메이션 */
.animate-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s var(--ease-out) forwards;
}
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}

/* 3. HEADER & NAV */
.navbar-wrapper {
    position: fixed; top: 0; left: 0; width: 100%; height: var(--header-height);
    z-index: 1000; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border); background: var(--glass-bg);
    display: flex; align-items: center;
}
.navbar { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.5px; z-index: 1001; }
.dot { color: var(--primary); }

.nav-links { display: flex; gap: 30px; }
.nav-links a { font-weight: 600; color: var(--text-sub); transition: color 0.2s; font-size: 0.95rem; }
.nav-links a:hover { color: var(--text-main); }

.nav-actions { display: flex; align-items: center; gap: 12px; }

/* User Status Pill */
.user-status {
    background: var(--border); padding: 4px 12px 4px 4px; border-radius: 20px;
    display: flex; align-items: center; font-size: 0.85rem; font-weight: 700;
    cursor: pointer; transition: transform 0.2s;
}
.user-status:active { transform: scale(0.95); }
.level-indicator { display: flex; align-items: center; gap: 8px; }
.progress-ring { transform: rotate(-90deg); }
.progress-ring-bg { stroke: rgba(128,128,128,0.3); stroke-width: 2; fill: transparent; }
.progress-ring-fill { stroke: var(--primary); stroke-width: 2; fill: transparent; stroke-dasharray: 63; stroke-dashoffset: 63; transition: stroke-dashoffset 0.5s; }

.icon-btn { 
    background: transparent; color: var(--text-main); font-size: 1.2rem; 
    padding: 8px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.icon-btn:hover { background: var(--border); }

/* Language Selector */
.lang-select-wrapper select, #mobile-lang-switcher {
    background-color: var(--card-bg);
    color: var(--text-main);
    border: 1px solid var(--border);
    padding: 6px 10px;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    outline: none;
}

/* 4. MOBILE MENU (누락 복구) */
.mobile-menu-btn {
    display: none; width: 32px; height: 32px; background: none; 
    align-items: center; justify-content: center;
}
.hamburger-icon {
    width: 20px; height: 2px; background: var(--text-main); position: relative;
}
.hamburger-icon::before, .hamburger-icon::after {
    content: ''; position: absolute; left: 0; width: 100%; height: 2px; background: var(--text-main); transition: 0.3s;
}
.hamburger-icon::before { top: -6px; }
.hamburger-icon::after { top: 6px; }

.mobile-menu-overlay {
    position: fixed; top: 0; right: 0; width: 100%; height: 100vh;
    background: rgba(0,0,0,0.5); z-index: 2000;
    opacity: 0; visibility: hidden; transition: 0.3s;
}
.mobile-menu-content {
    position: absolute; top: 0; right: -300px; width: 300px; height: 100%;
    background: var(--glass-solid); backdrop-filter: blur(15px);
    border-left: 1px solid var(--border); padding: 80px 30px 30px;
    transition: 0.4s var(--ease-out); display: flex; flex-direction: column; gap: 30px;
}
.mobile-menu-overlay.active { opacity: 1; visibility: visible; }
.mobile-menu-overlay.active .mobile-menu-content { right: 0; }

.close-menu-btn {
    position: absolute; top: 20px; right: 20px; font-size: 2rem; 
    color: var(--text-main); background: none;
}
.mobile-nav-links li { margin-bottom: 20px; }
.mobile-nav-links a { font-size: 1.5rem; font-weight: 800; color: var(--text-main); }
.mobile-options { border-top: 1px solid var(--border); padding-top: 20px; }
.mobile-label { font-size: 0.8rem; color: var(--text-sub); margin-bottom: 10px; }
#mobile-lang-switcher { width: 100%; padding: 10px; }

/* 5. HERO SECTION */
.hero-section {
    padding-top: calc(var(--header-height) + 80px); padding-bottom: 80px;
    text-align: center; position: relative; overflow: hidden;
}
.hero-glow {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 600px; height: 600px; background: radial-gradient(circle, rgba(255, 0, 85, 0.15) 0%, transparent 70%);
    filter: blur(80px); z-index: -1;
}
.badge {
    background: rgba(255, 0, 85, 0.1); color: var(--primary); padding: 6px 12px;
    border-radius: 20px; font-size: 0.8rem; font-weight: 700; letter-spacing: 1px;
}
.hero-title {
    font-size: 4rem; font-weight: 800; line-height: 1.1; margin: 20px 0; letter-spacing: -1px;
}
.text-gradient {
    background: linear-gradient(135deg, var(--text-main), var(--primary));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-subtitle { font-size: 1.2rem; color: var(--text-sub); margin-bottom: 30px; }
.btn {
    padding: 12px 28px; border-radius: 12px; font-weight: 700; font-size: 1rem;
    transition: transform 0.2s;
}
.btn-primary {
    background: var(--primary); color: white; box-shadow: 0 10px 20px rgba(255, 0, 85, 0.3);
}
.btn-primary:hover { transform: translateY(-2px); }
.btn-secondary { background: var(--text-main); color: var(--bg-color); }

/* 6. CONTENT & GRID */
.content-section { padding-bottom: 100px; }
.section-header {
    display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 30px;
}
.section-header h2 { font-size: 2rem; font-weight: 700; }
.link-arrow { color: var(--primary); font-weight: 600; }

.bento-grid {
    display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 250px 250px;
    gap: 20px; margin-bottom: 20px;
}
.card {
    background: var(--card-bg); border: 1px solid var(--border); border-radius: 24px;
    overflow: hidden; position: relative; transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    cursor: pointer;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 20px 40px rgba(0,0,0,0.1); border-color: var(--primary); }
.card-large { grid-column: 1 / 2; grid-row: 1 / 3; }
.card-small { grid-column: 2 / 3; }

.card-bg {
    width: 100%; height: 100%; background-size: cover; background-position: center;
    position: absolute; top: 0; left: 0; transition: transform 0.5s;
}
.card:hover .card-bg { transform: scale(1.05); }

.card-overlay {
    position: absolute; bottom: 0; left: 0; width: 100%; padding: 30px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent); color: white; z-index: 2;
}
.tag {
    background: var(--primary); color: white; padding: 4px 10px; border-radius: 8px;
    font-size: 0.75rem; font-weight: 700; text-transform: uppercase; display: inline-block; margin-bottom: 8px;
}
.tag.new { background: white; color: black; }
.card h3 { margin: 0; font-size: 1.5rem; line-height: 1.3; }

.wide-card-wrapper { margin-top: 20px; }
.card-wide { display: flex; height: 300px; }
.card-content-side { flex: 1; padding: 40px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.card-image-side { flex: 1; background-size: cover; background-position: center; }

/* 7. RESPONSIVE MEDIA QUERIES */
@media (max-width: 900px) {
    .desktop-only { display: none !important; }
    .mobile-menu-btn { display: flex; }
    
    .hero-title { font-size: 2.8rem; }
    .bento-grid { grid-template-columns: 1fr; grid-template-rows: auto; }
    .card-large { grid-column: 1; grid-row: auto; aspect-ratio: 16/9; }
    .card-small { grid-column: 1; grid-row: auto; aspect-ratio: 16/9; }
    
    .card-wide { flex-direction: column-reverse; height: auto; }
    .card-image-side { height: 200px; width: 100%; }
    .card-content-side { width: 100%; padding: 30px; }
}

.footer {
    padding: 40px 0; text-align: center; border-top: 1px solid var(--border);
    color: var(--text-sub); font-size: 0.9rem; margin-top: 40px;
}

/* EXP Particle */
.exp-float {
    position: fixed; color: var(--primary); font-weight: 800; font-size: 1.2rem;
    pointer-events: none; animation: floatUp 0.8s forwards; z-index: 9999;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
@keyframes floatUp {
    0% { transform: translate(-50%, 0) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -60px) scale(1.2); opacity: 0; }
}