:root {
    /* Base colors - never change */
    --bg-primary: #FDFCF8;
    --bg-secondary: #F5F1E8;
    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --border-light: #e5dcc9;
    --white: #ffffff;

    /* Theme colors - Default theme */
    --accent-primary: #2d5016;        /* Main dark green */
    --accent-secondary: #4a7c2c;      /* Lighter green for hover */
    --accent-warm: #c17767;           /* Warm terracotta */
    --accent-contrast: #ffffff;       /* Text on accent */
}

/* Christmas theme - ONLY change the greens to reds */
body.theme-christmas {
    --accent-primary: #a01729;        /* Darker Christmas red */
    --accent-secondary: #8b0000;      /* Even darker red for hover */
    /* accent-warm and accent-contrast stay the same! */
}

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

html {
    overscroll-behavior: none;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: background 0.3s ease;
    overscroll-behavior: none;
    min-height: 100vh;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Theme Selector */
.theme-selector {
    position: fixed;
    top: 10px;
    right: 20px;
    z-index: 1000;
}

body.theme-christmas .theme-selector {
    top: 30px;
}

.theme-toggle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--border-light);
    background: var(--white);
    cursor: pointer;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.theme-menu {
    position: absolute;
    top: 60px;
    right: 0;
    background: var(--white);
    border: 2px solid var(--border-light);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.theme-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.theme-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.theme-option:first-child {
    border-radius: 10px 10px 0 0;
}

.theme-option:last-child {
    border-radius: 0 0 10px 10px;
}

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

.theme-option.active {
    background: var(--accent-primary);
}

.theme-option.active .theme-option-name {
    font-weight: 600;
    color: var(--white);
}

.theme-option-icon {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
}

.theme-option-name {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
}

.theme-option.active .theme-option-name {
    color: var(--white);
}

.snowflakes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s ease;
}

body.theme-christmas .snowflakes {
    opacity: 1;
}

.snowflake {
    position: absolute;
    top: -50px;
    color: var(--accent-warm);
    font-size: 1.5em;
    user-select: none;
    animation: fall linear infinite;
}

@keyframes fall {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(calc(100vh + 100px));
    }
}

/* Navigation */
nav {
    background: var(--white);
    border-bottom: 1px solid var(--border-light);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

nav .nav-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    gap: 2.5rem;
    justify-content: center;
    padding: 1.25rem 2rem;
}

nav a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: width 0.3s ease;
}

nav a:hover {
    color: var(--accent-primary);
}

nav a:hover::after {
    width: 100%;
}

nav a.active {
    color: var(--accent-primary);
    font-weight: 600;
}

nav a.active::after {
    width: 100%;
}

nav a.disabled {
    color: #c0c0c0;
    cursor: not-allowed;
    font-style: italic;
}

nav a.disabled:hover {
    color: #c0c0c0;
}

nav a.disabled::after {
    display: none;
}

/* Container */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 6rem 2rem 2rem 2rem;
}

body.theme-christmas .container {
    padding-top: 7rem;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 4rem;
    padding-top: 2rem;
}

h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -1px;
}

header p {
    color: var(--text-secondary);
    font-size: 1.25rem;
    font-weight: 400;
}

h2 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-size: 2rem;
    font-weight: 600;
}

/* Sections */
section {
    margin-bottom: 3rem;
}

p {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

/* Links */
a {
    color: var(--accent-primary);
    transition: color 0.3s ease;
}

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

/* Confetti Canvas */
#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10000;
}

/* Christmas theme - Garland image on nav */
body.theme-christmas nav {
    position: fixed;
    border-bottom: none;
}

body.theme-christmas nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-image: url('../images/theme/christmas/christmas-navigation-banner.jpg');
    background-repeat: repeat-x;
    background-size: auto 60px;
    background-position: center top;
    pointer-events: none;
}

body.theme-christmas nav .nav-container {
    padding-top: 2.5rem; /* Make room for the garland */
}

/* Large tablets / iPad landscape */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 5rem 2rem 2rem 2rem;
    }

    body.theme-christmas .container {
        padding-top: 6rem;
    }
}

/* Tablets / iPad portrait */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    nav .nav-container {
        gap: 1.5rem;
        font-size: 0.9rem;
    }

    .container {
        padding: 5rem 1rem 2rem 1rem;
    }

    body.theme-christmas .container {
        padding-top: 6rem;
    }

    .snowflake {
        font-size: 1em;
    }

}

/* Phones */
@media (max-width: 576px) {
    .theme-selector {
        top: 10px;
        right: 15px;
    }

    body.theme-christmas .theme-selector {
        top: 30px;
    }

    .theme-toggle {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    nav .nav-container {
        gap: 1.25rem;
        padding: 1rem 1rem;
        font-size: 0.85rem;
    }

    .container {
        padding: 4.5rem 1rem 1rem 1rem;
    }

    body.theme-christmas .container {
        padding-top: 5.5rem;
    }

    .snowflake {
        font-size: 0.8em;
    }
}

/* Very small phones */
@media (max-width: 400px) {
    .theme-selector {
        top: 8px;
        right: 15px;
    }

    body.theme-christmas .theme-selector {
        top: 32px;
    }

    .theme-toggle {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }

    nav .nav-container {
        gap: 1rem;
        padding: 0.85rem 0.75rem;
        font-size: 0.8rem;
    }

    .container {
        padding: 4.5rem 0.75rem 1rem 0.75rem;
    }

    body.theme-christmas .container {
        padding-top: 6rem;
    }

    .snowflake {
        font-size: 0.6em;
    }
}