/* Catppuccin Latte (Light Theme) */
:root {
    --bg-primary: #eff1f5;
    --bg-secondary: #e6e9ef;
    --bg-alt: #dce0e8;
    --text-primary: #4c4f69;
    --text-secondary: #5c5f77;
    --text-muted: #6c6f85;
    --accent: #8839ef;
    --accent-hover: #7c3aed;
    --border: #ccd0da;
    --shadow: rgba(76, 79, 105, 0.1);
    --shadow-lg: rgba(76, 79, 105, 0.2);
}

/* Catppuccin Mocha (Dark Theme) */
[data-theme="dark"] {
    --bg-primary: #1e1e2e;
    --bg-secondary: #181825;
    --bg-alt: #313244;
    --text-primary: #cdd6f4;
    --text-secondary: #bac2de;
    --text-muted: #a6adc8;
    --accent: #cba6f7;
    --accent-hover: #b4a0e5;
    --border: #45475a;
    --shadow: rgba(0, 0, 0, 0.4);
    --shadow-lg: rgba(0, 0, 0, 0.6);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    backdrop-filter: blur(10px);
    background-color: rgba(239, 241, 245, 0.8);
}

[data-theme="dark"] .nav {
    background-color: rgba(30, 30, 46, 0.8);
}

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

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

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

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

.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    background-color: var(--bg-secondary);
}

.theme-icon {
    width: 20px;
    height: 20px;
    background-color: var(--text-primary);
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='5'/%3E%3Cline x1='12' y1='1' x2='12' y2='3'/%3E%3Cline x1='12' y1='21' x2='12' y2='23'/%3E%3Cline x1='4.22' y1='4.22' x2='5.64' y2='5.64'/%3E%3Cline x1='18.36' y1='18.36' x2='19.78' y2='19.78'/%3E%3Cline x1='1' y1='12' x2='3' y2='12'/%3E%3Cline x1='21' y1='12' x2='23' y2='12'/%3E%3Cline x1='4.22' y1='19.78' x2='5.64' y2='18.36'/%3E%3Cline x1='18.36' y1='5.64' x2='19.78' y2='4.22'/%3E%3C/svg%3E") center/contain;
}

[data-theme="dark"] .theme-icon {
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z'/%3E%3C/svg%3E") center/contain;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem 4rem;
}

.hero-content {
    max-width: 800px;
    text-align: center;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

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

.btn {
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
    display: inline-block;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--bg-primary);
    border-color: var(--accent);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px var(--shadow-lg);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    background-color: var(--bg-secondary);
    transform: translateY(-2px);
}

/* Sections */
.section {
    padding: 6rem 0;
}

.section-alt {
    background-color: var(--bg-secondary);
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 3rem;
    text-align: center;
    letter-spacing: -0.02em;
}

/* Info Cards */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.info-card {
    background-color: var(--bg-primary);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px var(--shadow-lg);
}

.info-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.info-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.info-card ul {
    list-style: none;
    padding: 0;
}

.info-card ul li {
    color: var(--text-secondary);
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.info-card ul li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

/* Device Badges */
.device-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.device-badge {
    padding: 0.5rem 1rem;
    background-color: var(--bg-alt);
    border-radius: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Install Section */
.install-container {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    background-color: var(--bg-primary);
    padding: 3rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    box-shadow: 0 10px 30px var(--shadow-lg);
}

.install-container h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.install-container p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

esp-web-install-button {
    display: inline-block;
    margin: 20px 0;
}

.install-button {
    background: var(--accent);
    color: var(--bg-primary);
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 4px 15px var(--shadow-lg);
    transition: all 0.2s ease;
}

.install-button:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-lg);
}

/* Warning Box */
.warning-box {
    background-color: var(--bg-alt);
    border-left: 4px solid var(--accent);
    padding: 1.5rem;
    margin-top: 2rem;
    border-radius: 0.5rem;
}

.warning-box p {
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
}

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

.footer p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

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

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-links a {
        font-size: 0.95rem;
    }
    
    .hero {
        padding: 5rem 1rem 3rem;
    }
    
    .section {
        padding: 4rem 0;
    }
    
    .install-container {
        padding: 2rem 1.5rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .nav-links a {
        font-size: 0.85rem;
    }
    
    .theme-toggle {
        width: 36px;
        height: 36px;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content {
    animation: fadeInUp 0.8s ease-out;
}

.info-card {
    animation: fadeInUp 0.6s ease-out backwards;
}

.info-card:nth-child(1) { animation-delay: 0.1s; }
.info-card:nth-child(2) { animation-delay: 0.2s; }
.info-card:nth-child(3) { animation-delay: 0.3s; }
