:root {
    --bg-color: #fcfcfc;
    --bg-gradient: linear-gradient(180deg, #fcfcfc 0%, #f0f2f5 100%);
    --accent-color: #2563eb;
    --accent-hover: #1d4ed8;
    --text-main: #1f2937;
    --text-muted: #4b5563;
    --card-bg: #ffffff;
    --card-border: #e5e7eb;
    --nav-bg: rgba(255, 255, 255, 0.85);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

[data-theme='dark'] {
    --bg-color: #0f172a;
    --bg-gradient: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    --accent-color: #38bdf8;
    --accent-hover: #7dd3fc;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --card-bg: #1e293b;
    --card-border: #334155;
    --nav-bg: rgba(15, 23, 42, 0.85);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Noto Sans KR', sans-serif;
    background: var(--bg-color);
    background-image: var(--bg-gradient);
    color: var(--text-main);
    line-height: 1.7;
    transition: background 0.4s ease;
}

h1, h2, h3, h4, .logo {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    margin: 0;
}

/* Header & Navigation */
.main-header {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid var(--card-border);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    color: var(--accent-color);
    letter-spacing: 1.5px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--accent-color);
}

#theme-button {
    background: var(--accent-color);
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    transition: opacity 0.2s;
}

/* Content Layout */
.content-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 80px 1.5rem 0;
}

section {
    padding: 5rem 0;
    scroll-margin-top: 80px;
}

.section-title {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-title h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.section-title p {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 8rem 0 5rem;
}

.hero-section h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: linear-gradient(90deg, var(--accent-color), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-section p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 2.5rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-primary, .btn-secondary {
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--accent-color);
    color: #fff;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--card-border);
    color: var(--text-main);
}

/* Tool Cards */
.tool-section {
    display: flex;
    justify-content: center;
}

.tool-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 3rem;
    width: 100%;
    max-width: 600px;
    box-shadow: var(--shadow-lg);
}

.tool-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.tool-header h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.tool-header p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Lotto & Display */
.display-screen {
    background: #f1f5f9;
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    min-height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--card-border);
}

[data-theme='dark'] .display-screen { background: #0f172a; }

.numbers-container {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

.number-ball {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    color: #fff;
    box-shadow: var(--shadow-sm);
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--card-border);
    border-radius: 16px;
    padding: 4rem 2rem;
    text-align: center;
    cursor: pointer;
    background: rgba(0,0,0,0.02);
    transition: all 0.2s;
}

.upload-area:hover {
    border-color: var(--accent-color);
    background: rgba(37, 99, 235, 0.05);
}

.image-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 12px;
}

/* Action Button */
.action-button {
    width: 100%;
    padding: 1.25rem;
    background: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.action-button:hover {
    background: var(--accent-hover);
    transform: scale(1.01);
}

/* Lifestyle Grid */
.lifestyle-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.lifestyle-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
}

.lifestyle-card h3 { font-size: 1.25rem; margin-bottom: 1rem; color: var(--accent-color); }
.lifestyle-card p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1.5rem; }

.styled-select {
    width: 100%;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    color: var(--text-main);
    margin-bottom: 1rem;
}

.btn-small {
    width: 100%;
    padding: 0.75rem;
    background: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    cursor: pointer;
}

.goal-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.goal-btn {
    padding: 0.75rem;
    background: transparent;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.goal-btn.active {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
}

/* Insights Articles */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.article-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 2.5rem;
    transition: transform 0.3s ease;
}

.article-header { margin-bottom: 1.5rem; border-bottom: 1px solid var(--card-border); padding-bottom: 1rem; }
.article-header h3 { font-size: 1.5rem; margin-bottom: 0.5rem; color: var(--text-main); }
.article-meta { font-size: 0.75rem; color: var(--accent-color); font-weight: 700; text-transform: uppercase; }
.article-body p { margin: 0; color: var(--text-muted); line-height: 1.8; }

/* Info & FAQ */
.info-section {
    max-width: 800px;
    margin: 0 auto;
}

.info-section h2 { margin-bottom: 2rem; border-left: 4px solid var(--accent-color); padding-left: 1rem; }

.faq-list { display: flex; flex-direction: column; gap: 1.5rem; }
.faq-item h4 { margin-bottom: 0.5rem; color: var(--text-main); }
.faq-item p { font-size: 0.9rem; color: var(--text-muted); }

.policy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.policy-card { background: rgba(0,0,0,0.02); padding: 2rem; border-radius: 12px; }
.policy-card h3 { font-size: 1rem; margin-bottom: 0.75rem; }
.policy-card p { font-size: 0.85rem; color: var(--text-muted); margin: 0; }

/* Contact Form */
.contact-section { text-align: center; }
.contact-section h2 { margin-bottom: 1rem; }
.contact-section p { color: var(--text-muted); margin-bottom: 2.5rem; }

.styled-form { max-width: 600px; margin: 0 auto; display: flex; flex-direction: column; gap: 1rem; }
.form-row { display: flex; gap: 1rem; }
.form-row input { flex: 1; }
.styled-form input, .styled-form textarea {
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    color: var(--text-main);
}
.styled-form textarea { height: 150px; resize: none; }
.submit-button {
    padding: 1.25rem;
    background: var(--text-main);
    color: var(--bg-color);
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    cursor: pointer;
}

/* Footer */
.main-footer {
    background: var(--card-bg);
    border-top: 1px solid var(--card-border);
    padding: 5rem 1.5rem 2rem;
    margin-top: 5rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-info p { font-size: 0.9rem; color: var(--text-muted); margin-top: 1rem; max-width: 300px; }
.footer-nav h4, .footer-legal h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 1.5rem; }
.footer-nav, .footer-legal { display: flex; flex-direction: column; gap: 0.75rem; }
.footer-nav a, .footer-legal a { text-decoration: none; color: var(--text-muted); font-size: 0.85rem; }

.footer-bottom { text-align: center; border-top: 1px solid var(--card-border); padding-top: 2rem; font-size: 0.75rem; color: var(--text-muted); }

/* Animations */
@keyframes popIn { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } }
.spinner {
    border: 3px solid rgba(0,0,0,0.1);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border-left-color: var(--accent-color);
    animation: spin 1s linear infinite;
    margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.bar-container { background: #e2e8f0; height: 8px; border-radius: 4px; overflow: hidden; margin: 4px 0; }
[data-theme='dark'] .bar-container { background: #334155; }
.bar { height: 100%; background: var(--accent-color); width: 0; transition: width 0.6s ease; }

/* Mobile */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero-section h1 { font-size: 2.25rem; }
    .lifestyle-grid, .footer-container { grid-template-columns: 1fr; }
    .footer-container { gap: 2.5rem; text-align: center; }
    .footer-info p { margin: 1rem auto; }
    .form-row { flex-direction: column; }
}
