/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Light Theme Colors - Cocoa & Cream */
    --primary-color: #8A5A3B;
    --primary-dark: #6B4530;
    --secondary-color: #A67C52;
    --accent-color: #D4A574;
    --text-primary: #3C2A1A;
    --text-secondary: #6B4E3D;
    --text-light: #8A6F5A;
    --bg-primary: #F4F0D6;
    --bg-secondary: #F9F6E8;
    --bg-tertiary: #FDFCF5;
    --border-color: #E8DCC0;
    --shadow-light: 0 2px 10px rgba(138, 90, 59, 0.1);
    --shadow-medium: 0 4px 20px rgba(138, 90, 59, 0.15);
    --shadow-heavy: 0 8px 30px rgba(138, 90, 59, 0.2);
    --gradient-primary: linear-gradient(135deg, #8A5A3B 0%, #A67C52 100%);
    --gradient-secondary: linear-gradient(135deg, #D4A574 0%, #E8C4A0 100%);
}

[data-theme="dark"] {
    /* Dark Theme Colors - Cocoa & Cream Dark Variant */
    --primary-color: #B87A5A;
    --primary-dark: #8A5A3B;
    --secondary-color: #D4A574;
    --accent-color: #E8C4A0;
    --text-primary: #F4F0D6;
    --text-secondary: #E8DCC0;
    --text-light: #D4C4A8;
    --bg-primary: #2A1F15;
    --bg-secondary: #3C2A1A;
    --bg-tertiary: #4A3424;
    --border-color: #5A4030;
    --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.3);
    --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-heavy: 0 8px 30px rgba(0, 0, 0, 0.5);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans KR', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: all 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    justify-content: center;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-light);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all 0.3s ease;
}

[data-theme="dark"] .header {
    background: rgba(26, 26, 26, 0.95);
}

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

.nav-container .nav-menu {
    margin-left: auto;
}


.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle, .language-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-primary);
}

.theme-toggle:hover, .language-toggle:hover {
    background: var(--bg-tertiary);
}

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-tertiary) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(138, 90, 59, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(212, 165, 116, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 600px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.hero-buttons {
    margin-bottom: 2rem;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-screenshot {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: var(--shadow-heavy);
    transition: transform 0.3s ease;
}

.hero-screenshot:hover {
    transform: scale(1.02);
}

/* Features Section */
.features {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: #2A1F15;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
    border: 1px solid #3C2A1A;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #D4A574 0%, #E8C4A0 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #D4A574 0%, #E8C4A0 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.feature-icon i {
    font-size: 1.5rem;
    color: #2A1F15;
}

.feature-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #F4F0D6;
    font-weight: 600;
}

.feature-description {
    color: #E8DCC0;
    line-height: 1.6;
}

/* Screenshots Section */
.screenshots {
    padding: 80px 0;
    background: var(--bg-primary);
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.screenshot-item {
    text-align: center;
}

.screenshot {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 16px;
    box-shadow: var(--shadow-medium);
    transition: transform 0.3s ease;
    margin-bottom: 1rem;
}

.screenshot:hover {
    transform: scale(1.05);
}

.screenshot-caption {
    font-weight: 500;
    color: var(--text-primary);
}

/* Download Section */
.download {
    padding: 80px 0;
    background: var(--gradient-primary);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.download::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.download .section-title {
    color: white;
    position: relative;
    z-index: 1;
}

.download-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
}

.download-buttons {
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.download .btn-primary {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.download .btn-primary:hover {
    background: var(--bg-secondary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.download-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.download-version, .download-size {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* Privacy & Terms Sections */
.privacy, .terms {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.privacy-content, .terms-content {
    max-width: 800px;
    margin: 0 auto;
}

.privacy-section, .terms-section {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
}

.privacy-section h3, .terms-section h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.privacy-section p, .terms-section p {
    line-height: 1.7;
}

/* Footer */
.footer {
    background: var(--bg-tertiary);
    padding: 3rem 0 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    text-align: center;
}


.footer-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-copyright p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        padding: 1rem;
    }
    
    .nav-menu {
        display: none;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .screenshots-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .download-info {
        flex-direction: column;
        gap: 1rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .btn-large {
        padding: 14px 28px;
        font-size: 1rem;
    }
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Focus States for Accessibility */
.btn:focus,
.nav-link:focus,
.theme-toggle:focus,
.language-toggle:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
        --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.3);
    }
    
    [data-theme="dark"] {
        --border-color: #FFFFFF;
        --shadow-light: 0 2px 10px rgba(255, 255, 255, 0.3);
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}
