:root {
    --bg-color: #fcfdfe;
    --text-color: #1a1c1e;
    --container-bg: #ffffff;
    --primary-color: #2563eb;
    --accent-color: #3b82f6;
    --circle-text: #fff;
    --btn-bg: #f1f5f9;
    --btn-text: #334155;
    --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --header-bg: rgba(255, 255, 255, 0.8);
    --badge-bg: #e0e7ff;
    --badge-text: #4338ca;
}

.dark-mode {
    --bg-color: #0f172a;
    --text-color: #f1f5f9;
    --container-bg: #1e293b;
    --primary-color: #3b82f6;
    --accent-color: #60a5fa;
    --circle-text: #fff;
    --btn-bg: #334155;
    --btn-text: #f1f5f9;
    --card-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -6px rgba(0, 0, 0, 0.3);
    --header-bg: rgba(15, 23, 42, 0.8);
    --badge-bg: #312e81;
    --badge-text: #c7d2fe;
}

* {
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding-top: 80px;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.4s ease, color 0.4s ease;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* Header & Navigation */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--header-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1000;
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.025em;
}

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

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

.nav-links a:hover {
    color: var(--primary-color);
    opacity: 1;
}

#theme-toggle {
    background: var(--btn-bg);
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 10px;
    color: var(--btn-text);
    transition: transform 0.2s ease;
}

#theme-toggle:hover {
    transform: rotate(15deg);
}

/* Main Layout */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.hero-section {
    text-align: center;
    padding: 80px 20px;
}

.hero-section h1 {
    font-size: 2.75rem;
    font-weight: 800;
    margin-bottom: 24px;
    color: var(--text-color);
    letter-spacing: -0.05em;
    line-height: 1.2;
}

.hero-section p {
    font-size: 1.2rem;
    opacity: 0.7;
    max-width: 650px;
    margin: 0 auto;
}

/* Card Style Sections */
.card {
    background-color: var(--container-bg);
    border-radius: 24px;
    padding: 50px;
    margin-bottom: 50px;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease, background-color 0.4s ease;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    background-color: var(--badge-bg);
    color: var(--badge-text);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.card h2 {
    margin-top: 0;
    margin-bottom: 24px;
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.content-text {
    margin-bottom: 40px;
    text-align: left;
    color: var(--text-color);
    opacity: 0.9;
}

.content-text p {
    margin-bottom: 20px;
}

/* Lotto styling */
.lotto-display-area {
    background: var(--btn-bg);
    padding: 40px;
    border-radius: 20px;
    margin-bottom: 30px;
}

.lotto-numbers {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    min-height: 64px;
}

.lotto-number {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--circle-text);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    animation: pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

@keyframes pop {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    text-align: left;
}

.detail-item {
    padding: 20px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 16px;
}

.detail-item h3 {
    font-size: 1rem;
    margin-top: 0;
    color: var(--primary-color);
}

.detail-item p {
    font-size: 0.9rem;
    margin-bottom: 0;
    opacity: 0.8;
}

/* AI section styles */
.upload-box {
    border: 2px dashed var(--accent-color);
    border-radius: 24px;
    padding: 60px 40px;
    cursor: pointer;
    background-color: var(--bg-color);
    position: relative;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.upload-box:hover {
    border-color: var(--primary-color);
    background-color: rgba(37, 99, 235, 0.03);
    transform: translateY(-2px);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.upload-box .sub-text {
    font-size: 0.8rem;
    margin-top: 8px;
    opacity: 0.5;
}

.ai-status {
    position: absolute;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(4px);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 22px;
    z-index: 10;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.prediction-container {
    margin-top: 30px;
    display: grid;
    gap: 12px;
}

.prediction-container div {
    padding: 16px 20px;
    border-radius: 14px;
    background-color: var(--btn-bg);
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.info-box {
    background-color: var(--badge-bg);
    padding: 25px;
    border-radius: 18px;
    text-align: left;
    margin-top: 30px;
    font-size: 0.95rem;
    color: var(--badge-text);
}

.info-box h3 {
    margin-top: 0;
    font-size: 1.1rem;
    color: var(--badge-text);
}

/* FAQ Styling */
.faq-section h2 {
    margin-bottom: 40px;
}

.faq-item {
    text-align: left;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.faq-item h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: var(--primary-color);
}

.faq-item p {
    font-size: 0.95rem;
    opacity: 0.8;
}

/* Form Styling */
.form-group {
    margin-bottom: 24px;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 18px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 14px;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.submit-btn {
    width: 100%;
    padding: 18px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

/* Footer Styling */
.site-footer {
    text-align: center;
    padding: 100px 20px;
    background-color: var(--container-bg);
    margin-top: 100px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-links {
    margin-top: 24px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-links a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.85rem;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.footer-links a:hover {
    opacity: 1;
}

.small-text {
    font-size: 0.85rem;
    opacity: 0.7;
}

/* Main Button */
.main-btn {
    padding: 18px 40px;
    font-size: 1.1rem;
    border: none;
    border-radius: 16px;
    background: var(--text-color);
    color: var(--container-bg);
    font-weight: 700;
    transition: all 0.2s ease;
    cursor: pointer;
}

.main-btn:hover {
    transform: scale(1.05);
    background: var(--primary-color);
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .card {
        padding: 30px 20px;
    }

    .details-grid {
        grid-template-columns: 1fr;
    }
}

