:root {
    /* Light Mode */
    --primary-color: #6D5D6E;
    --secondary-color: #F4EEE0;
    --accent-color: #D6A4A4;
    --text-dark: #393646;
    --text-light: #6D5D6E;
    --white: #FFFFFF;
    --bg-container: #FFFFFF;
    --bg-upload-box: #FFFFFF;
    --bg-ad: #f9f7f2;
    --border-upload: #d1cfc7;
    --shadow: 0 10px 30px rgba(0,0,0,0.08);
    --border-radius: 20px;
    --font-main: 'Noto Serif KR', serif;
    --font-sans: 'Poppins', sans-serif;
}

[data-theme="dark"] {
    --primary-color: #A084E8;
    --secondary-color: #1A1A1A;
    --accent-color: #6F61C0;
    --text-dark: #F5F5F5;
    --text-light: #B0B0B0;
    --white: #2D2D2D;
    --bg-container: #242424;
    --bg-upload-box: #2D2D2D;
    --bg-ad: #333333;
    --border-upload: #444444;
    --shadow: 0 10px 30px rgba(0,0,0,0.5);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--secondary-color);
    color: var(--text-dark);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    transition: background-color 0.3s ease;
}

.container {
    width: 100%;
    max-width: 480px;
    background: var(--bg-container);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: var(--shadow);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Nav */
.top-nav { 
    padding: 1rem 1.5rem; 
    display: flex; 
    flex-direction: column;
    align-items: center;
    border-bottom: 1px solid var(--border-upload); 
    background: var(--bg-container);
    gap: 0.8rem;
}
.logo { font-weight: 700; color: var(--primary-color); font-size: 1.4rem; font-family: var(--font-main); }

.main-menu {
    display: flex;
    gap: 1.2rem;
}
.main-menu a {
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    transition: 0.3s;
}
.main-menu a.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

.theme-toggle-static {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

#theme-btn { 
    background: var(--bg-ad); 
    border: none; 
    width: 36px; 
    height: 36px; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    cursor: pointer; 
    color: var(--text-dark); 
}

/* Sections Control */
section { 
    display: none; 
    padding: 2rem; 
    width: 100%;
}
section.active { 
    display: flex; 
    flex-direction: column; 
    animation: fadeIn 0.4s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Hero */
.hero-section { text-align: center; margin-bottom: 1.5rem; }
h1 { font-family: var(--font-main); font-size: 2.4rem; line-height: 1.2; color: var(--text-dark); margin-bottom: 1rem; }
.badge { background: var(--primary-color); color: white; padding: 0.4rem 1rem; border-radius: 50px; font-size: 0.75rem; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 1rem; display: inline-block; }
.subtitle { font-size: 1rem; color: var(--text-light); margin-bottom: 1.5rem; }

.hero-image-placeholder { width: 160px; height: 160px; background: var(--bg-ad); border-radius: 50%; margin: 0 auto 1.5rem; display: flex; align-items: center; justify-content: center; position: relative; }
.hero-image-placeholder i { font-size: 4rem; color: var(--primary-color); opacity: 0.2; }
.face-scan-effect { position: absolute; width: 100%; height: 3px; background: var(--accent-color); top: 0; animation: scan 2s infinite ease-in-out; }
@keyframes scan { 0% { top: 0%; opacity: 0; } 50% { opacity: 1; } 100% { top: 100%; opacity: 0; } }

.note { font-size: 0.85rem; color: var(--text-light); opacity: 0.8; margin-bottom: 1rem; text-align: center; }

/* Article Content */
.article-content { text-align: left; padding: 1.5rem; background: var(--bg-ad); border-radius: var(--border-radius); margin-top: 1rem; }
.article-content h1 { font-size: 1.8rem; color: var(--primary-color); margin-bottom: 1.2rem; }
.article-content h2 { font-family: var(--font-main); font-size: 1.4rem; color: var(--primary-color); margin-bottom: 1rem; }
.article-content h3 { font-size: 1.1rem; margin: 1.2rem 0 0.6rem; color: var(--text-dark); border-left: 4px solid var(--accent-color); padding-left: 0.8rem; }
.article-content p { font-size: 0.95rem; line-height: 1.7; color: var(--text-dark); margin-bottom: 1rem; }

.feature-box { padding: 1.2rem; border-radius: 12px; border: 1px solid var(--border-upload); margin: 1.5rem 0; }
.feature-box h3, .feature-box h4 { font-size: 1rem; margin-bottom: 0.5rem; color: var(--primary-color); }

.guide-item { margin-bottom: 2rem; }
.guide-item h3 { border-left: none; padding-left: 0; color: var(--accent-color); font-size: 1.2rem; }

.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; margin: 1rem 0; }
.info-item { background: var(--white); padding: 1rem; border-radius: 12px; box-shadow: 0 4px 10px rgba(0,0,0,0.02); }
.info-item i { color: var(--accent-color); margin-bottom: 0.4rem; font-size: 1.2rem; display: block; }
.info-item h4 { font-size: 0.9rem; margin-bottom: 0.3rem; color: var(--primary-color); }
.info-item p { font-size: 0.8rem; color: var(--text-light); line-height: 1.4; }

/* Buttons */
.cta-button { 
    width: 100%; 
    padding: 1.2rem; 
    border-radius: 15px; 
    border: none; 
    font-size: 1.1rem; 
    font-weight: 700; 
    cursor: pointer; 
    transition: 0.2s; 
    margin-bottom: 0.8rem; 
    font-family: var(--font-sans);
    display: block;
    text-align: center;
}
.cta-button.primary { background: var(--primary-color); color: white; box-shadow: 0 4px 12px rgba(92, 75, 153, 0.2); }
.cta-button.secondary { background: var(--accent-color); color: white; }
.cta-button.outline { background: transparent; border: 2.5px solid var(--primary-color); color: var(--primary-color); }
.cta-button:active { transform: scale(0.98); }

/* Upload Section */
.nav-bar { display: flex; align-items: center; margin-bottom: 1.5rem; width: 100%; }
.back-btn { background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--text-dark); margin-right: 1rem; display: flex; align-items: center; }

.upload-box { 
    border: 3px dashed var(--border-upload); 
    border-radius: var(--border-radius); 
    padding: 4rem 2rem; 
    text-align: center; 
    cursor: pointer; 
    background: var(--bg-upload-box); 
    width: 100%;
}
.upload-box i { font-size: 3.5rem; color: var(--text-light); opacity: 0.4; margin-bottom: 1rem; display: block; }

#preview-container { width: 100%; margin: 1.5rem 0; border-radius: var(--border-radius); overflow: hidden; }
#image-preview { width: 100%; display: block; border-radius: var(--border-radius); }

/* Loading */
.spinner { width: 50px; height: 50px; border: 5px solid var(--bg-ad); border-top: 5px solid var(--primary-color); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 1.5rem; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Result */
.result-card { background: var(--white); border-radius: var(--border-radius); padding: 1.5rem; text-align: center; box-shadow: var(--shadow); margin-bottom: 1.5rem; }
.result-img-container { width: 150px; height: 150px; border-radius: 50%; margin: 1rem auto; overflow: hidden; border: 4px solid var(--bg-ad); }
#result-user-img { width: 100%; height: 100%; object-fit: cover; }
#result-title { font-family: var(--font-main); font-size: 2rem; color: var(--primary-color); margin-bottom: 0.8rem; }

.data-bars { text-align: left; margin-top: 1.5rem; }
.bar-item { margin-bottom: 1rem; }
.bar-item span { font-size: 0.9rem; font-weight: 600; display: block; margin-bottom: 0.4rem; }
.progress-bg { height: 10px; background: var(--bg-ad); border-radius: 5px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent-color); width: 0; transition: width 1s ease-out; }

/* Footer */
.site-footer { padding: 2.5rem 2rem; text-align: center; border-top: 1px solid var(--border-upload); background: var(--white); margin-top: auto; }
.footer-sections { display: flex; justify-content: space-around; text-align: left; margin-bottom: 2rem; }
.f-sec h4 { font-size: 0.95rem; margin-bottom: 1rem; color: var(--primary-color); }
.f-sec a { display: block; color: var(--text-light); text-decoration: none; font-size: 0.85rem; margin-bottom: 0.5rem; }

.footer-bottom { border-top: 1px solid var(--bg-ad); padding-top: 1.5rem; }
.copyright { font-size: 0.85rem; font-weight: 700; color: var(--text-dark); margin-bottom: 0.4rem; }
.footer-note { font-size: 0.75rem; color: var(--text-light); line-height: 1.4; }

.hidden { display: none !important; }

/* GEO Optimized Sections */
.reviews-section, .faq-section { margin-top: 2rem; }
.reviews-section h3, .faq-section h3 { font-family: var(--font-main); font-size: 1.3rem; margin-bottom: 1rem; color: var(--primary-color); }

.review-grid { display: flex; flex-direction: column; gap: 1rem; }
.review-card { background: var(--white); padding: 1.2rem; border-radius: 15px; border: 1px solid var(--bg-ad); }
.review-card .stars { color: #FFD700; margin-bottom: 0.5rem; font-size: 1rem; }
.review-card p { font-size: 0.9rem; color: var(--text-dark); margin-bottom: 0.8rem; line-height: 1.5; font-style: italic; }
.review-card .reviewer { font-size: 0.8rem; color: var(--text-light); float: right; }

.faq-list { display: flex; flex-direction: column; gap: 0.8rem; }
details { background: var(--white); border-radius: 12px; overflow: hidden; border: 1px solid var(--bg-ad); }
summary { padding: 1rem; cursor: pointer; font-weight: 600; color: var(--text-dark); list-style: none; display: flex; justify-content: space-between; align-items: center; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; font-size: 1.2rem; color: var(--primary-color); }
details[open] summary::after { content: '-'; }
details p { padding: 0 1rem 1rem 1rem; color: var(--text-light); font-size: 0.9rem; line-height: 1.6; border-top: 1px solid var(--bg-ad); margin-top: 0.5rem; padding-top: 0.5rem; }
