:root {
    /* Base Variables (Light Mode Default) */
    --bg-color: #f8f5f1;
    --surface-color: #ffffff;
    --text-color: #1a202c;
    --text-muted: #64748b;
    --accent-primary: #dc2626df;
    /* Red 600 */
    --accent-secondary: #ef4444;
    /* Red 500 */
    /* Violet */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --card-hover-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --glow-color: rgba(220, 38, 38, 0.15);
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --bg-color: #0f172a;
    /* Slate 900 */
    --surface-color: #1e293b;
    /* Slate 800 */
    --text-color: #f1f5f9;
    /* Slate 100 */
    --text-muted: #94a3b8;
    /* Slate 400 */
    --accent-primary: #f87171;
    /* Red 400 */
    --accent-secondary: #fca5a5;
    /* Red 300 */
    /* Violet 400 */
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --card-hover-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
    --glow-color: rgba(248, 113, 113, 0.2);
}

* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-bottom: 80px;
    /* Spacer for fixed footer */
}

/* Glassmorphism Utilities */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

.container {
    max-width: 1200px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 700;
    color: var(--text-color);
    font-size: 1.5rem;
    text-decoration: none;
}

.navbar-brand img {
    height: 40px;
    width: auto;
}

/* Theme Switcher */
/* Theme Switcher Toggle */
.theme-switch {
    cursor: pointer;
    position: relative;
    width: 50px;
    height: 28px;
    background: var(--surface-color);
    border-radius: 20px;
    border: 1px solid var(--text-muted);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    padding: 2px;
}

.theme-switch .toggle-knob {
    width: 22px;
    height: 22px;
    background: var(--text-color);
    border-radius: 50%;
    position: absolute;
    left: 3px;
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-color);
}

[data-theme="dark"] .theme-switch .toggle-knob {
    transform: translateX(22px);
    background: var(--text-color);
}

.theme-switch:hover {
    border-color: var(--text-color);
}

.theme-switch svg {
    width: 14px;
    height: 14px;
}

/* Button Styles */
.btn-primary-custom {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 2rem;
    font-weight: 600;
    box-shadow: 0 4px 15px var(--glow-color);
    transition: all 0.3s ease;
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--glow-color);
    color: white;
}

/* Spacer for fixed navbar if we add one later */
.spacer {
    height: 80px;
}

/* Hero Section */
.hero {
    padding: 6rem 1rem 2rem 1rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

@keyframes cosmos-flow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    /* Cosmos/Milky Way Gradient */
    background: linear-gradient(270deg,
            #0f172a,
            /* Deep Space */
            #7e22ce,
            /* Nebula Purple */
            #be185d,
            /* Star Pink */
            #e11d48,
            /* Red shift */
            #4338ca,
            /* Indigo */
            #0ea5e9,
            /* Cyan */
            #7e22ce
            /* repeat */
        );
    background-size: 400% 400%;
    animation: cosmos-flow 12s ease infinite;

    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    letter-spacing: -0.02em;
}

.hero .tagline {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    font-weight: 400;
}

/* Apps Grid */
.apps-section {
    padding: 2rem 0 4rem 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 3rem;
    text-align: center;
}

.app-card {
    background: var(--surface-color);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: var(--card-shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.app-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-hover-shadow);
    border-color: var(--accent-primary);
}

.app-card:hover::before {
    opacity: 1;
}

.app-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.75rem;
}

.app-card p {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.app-icon {
    width: 64px;
    height: 64px;
    border-radius: 1rem;
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.app-link-text {
    font-weight: 600;
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
}

.app-link-text-disabled {
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
}

.app-link-text svg {
    transition: transform 0.2s ease;
}

.app-card:hover .app-link-text svg {
    transform: translateX(4px);
}

/* Fixed Footer */
footer {
    /* position: fixed; */
    /* bottom: 0; */
    /* left: 0; */
    width: 100%;
    text-align: center;
    padding: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--glass-border);
    background-color: var(--bg-color);
    z-index: 1000;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Mobile Improvements */
@media (max-width: 768px) {
    .hero {
        padding: 4rem 1rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 1.75rem;
    }
}

/* Coming Soon / Disabled State */
.app-card.disabled {
    opacity: 0.7;
    cursor: default;
    box-shadow: none;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .app-card.disabled {
    border-color: rgba(255, 255, 255, 0.05);
}

.app-card.disabled:hover {
    transform: none;
    box-shadow: none;
    border-color: transparent;
}

.app-card.disabled::before {
    display: none;
}

/* Legal Content Styles (Privacy/Terms) */
.legal-content h1,
.legal-content h2 {
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.legal-content h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.legal-content p,
.legal-content ul {
    color: var(--text-muted);
    line-height: 1.7;
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
    background: var(--surface-color);
    padding: 3rem;
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: var(--card-shadow);
}