:root {
    /* Website Dark Theme */
    --website-dark-bg: #010101;
    --website-dark-surface: #202222;
    --website-dark-text: #FFFFFF;
    --website-dark-text-secondary: #A1A1AA;
    --website-dark-grid: rgba(255, 255, 255, 0.03);
    --website-dark-glow-start: rgba(66, 108, 157, 0.4);
    --website-dark-glow-mid: rgba(66, 108, 157, 0.2);

    /* Website Light Theme */
    --website-light-bg: #F5F5F5;
    --website-light-surface: #FFFFFF;
    --website-light-text: #111111;
    --website-light-text-secondary: #4B5563;
    --website-light-grid: rgba(0, 0, 0, 0.05);
    --website-light-glow-start: rgba(100, 149, 237, 0.15);
    --website-light-glow-mid: rgba(100, 149, 237, 0.10);

    /* App Theme */
    --app-bg: #16181C;
    --app-surface: #202222;
    --app-text: #FFFFFF;
    --app-text-secondary: #ABB2BF;
    
    /* Current theme colors */
    --background: var(--website-dark-bg);
    --surface: var(--website-dark-surface);
    --text-primary: var(--website-dark-text);
    --text-secondary: var(--website-dark-text-secondary);
    --grid-line: var(--website-dark-grid);
    --glow-start: var(--website-dark-glow-start);
    --glow-mid: var(--website-dark-glow-mid);
}

/* Effects Demo */
.effects-demo {
    margin: 2rem 0;
    border-radius: 0.5rem;
    overflow: hidden;
}

.hero-background {
    position: relative;
    min-height: 400px;
    background: var(--background);
    overflow: hidden;
}

.glow-effect {
    position: absolute;
    inset: 0;
    background: radial-gradient(
        circle at 40% 0%,
        var(--glow-start),
        var(--glow-mid) 40%,
        transparent 70%
    );
    animation: glowPulse 4s ease-in-out infinite;
    pointer-events: none;
}

.grid-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.7;
    animation: gridFloat 60s linear infinite;
}

body.website-light-theme .grid-pattern {
    mask-image: radial-gradient(
        ellipse at center,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 1) 40%,
        rgba(0, 0, 0, 0.8) 60%,
        rgba(0, 0, 0, 0) 80%
    ),
    linear-gradient(to bottom,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 0.8) 40%,
        rgba(0, 0, 0, 0) 100%
    );
    -webkit-mask-image: radial-gradient(
        ellipse at center,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 1) 40%,
        rgba(0, 0, 0, 0.8) 60%,
        rgba(0, 0, 0, 0) 80%
    ),
    linear-gradient(to bottom,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 0.8) 40%,
        rgba(0, 0, 0, 0) 100%
    );
}

@keyframes gridFloat {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(-40px, -40px);
    }
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.8;
    }
    50% {
        opacity: 1;
    }
}

.effect-description {
    position: relative;
    z-index: 2;
    padding: 2rem;
    color: var(--text-primary);
}

.effect-description h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.effect-code {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--surface);
    border-radius: 0.25rem;
    font-family: monospace;
    font-size: 0.875rem;
}

.effect-code pre {
    margin: 0;
    white-space: pre-wrap;
}

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

body {
    font-family: 'Lato', sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.5;
    transition: background-color 0.3s ease;
    position: relative;
    min-height: 100vh;
}

/* Full page background effects */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(
        circle at 40% 0%,
        var(--glow-start),
        var(--glow-mid) 40%,
        transparent 70%
    );
    animation: glowPulse 4s ease-in-out infinite;
    pointer-events: none;
    z-index: -2;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: 
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.7;
    animation: gridFloat 60s linear infinite;
    z-index: -1;
}

body.website-light-theme::after {
    mask-image: radial-gradient(
        ellipse at center,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 1) 40%,
        rgba(0, 0, 0, 0.8) 60%,
        rgba(0, 0, 0, 0) 80%
    ),
    linear-gradient(to bottom,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 0.8) 40%,
        rgba(0, 0, 0, 0) 100%
    );
    -webkit-mask-image: radial-gradient(
        ellipse at center,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 1) 40%,
        rgba(0, 0, 0, 0.8) 60%,
        rgba(0, 0, 0, 0) 80%
    ),
    linear-gradient(to bottom,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 0.8) 40%,
        rgba(0, 0, 0, 0) 100%
    );
}

/* Logo styles */
.logo {
    height: 32px;
    display: flex;
    align-items: center;
}

.logo img {
    height: 100%;
    width: auto;
}

/* Show/hide logos based on theme */
.logo-dark {
    display: block;
}

.logo-light {
    display: none;
}

body.website-light-theme .logo-dark {
    display: none;
}

body.website-light-theme .logo-light {
    display: block;
}

/* Navigation */
nav {
    background-color: #010101;  /* Dark theme website nav */
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

body.website-light-theme nav {
    background-color: #F5F5F5;  /* Light theme website nav */
}

body.app-theme nav {
    background-color: #16181C;  /* App theme nav */
}

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

.logo {
    font-size: 1.25rem;
    font-weight: 700;
}

/* Preamble */
.preamble {
    margin: 4rem auto;
    max-width: 900px;
}

.preamble h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.preamble-content {
    font-size: 1.125rem;
    line-height: 1.7;
}

.preamble-content p {
    margin-bottom: 1.5rem;
}

.preamble-content p:last-child {
    margin-bottom: 0;
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

section {
    margin-bottom: 4rem;
}

h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    font-weight: 700;
}

h3 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    font-weight: 600;
}

/* Color Grid */
.color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.color-item {
    background: var(--surface);
    border-radius: 0.5rem;
    overflow: hidden;
}

.color-swatch {
    height: 100px;
    border-radius: 0.5rem 0.5rem 0 0;
}

.color-info {
    padding: 1rem;
}

.color-info h4 {
    margin-bottom: 0.5rem;
}

/* Typography Examples */
.type-example {
    margin: 2rem 0;
    padding: 1rem;
    background: var(--surface);
    border-radius: 0.5rem;
}

.type-info {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--text-secondary);
    opacity: 0.7;
}

.type-info code {
    display: block;
    margin: 0.25rem 0;
    font-family: monospace;
}

/* Component Examples */
.component-example {
    margin: 2rem 0;
    padding: 2rem;
    background: var(--surface);
    border-radius: 0.5rem;
}

.component-info {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--text-secondary);
}

/* Buttons */
.primary-button {
    background: #202222;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-family: 'Lato', sans-serif;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.primary-button:hover {
    transform: scale(1.05);
}

.secondary-button {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid currentColor;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-family: 'Lato', sans-serif;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.secondary-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Theme Toggle */
.theme-button {
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-family: 'Lato', sans-serif;
    transition: all 0.3s ease;
}

.theme-button:hover {
    background: var(--text-primary);
    color: var(--background);
}

/* Light Theme */
body.light-theme {
    --background: var(--background-light);
    --surface: var(--surface-light);
    --text-primary: var(--text-primary-light);
    --text-secondary: var(--text-secondary-light);
}

/* Responsive Design */
@media (max-width: 768px) {
    .color-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
}
