/* =============================
   CSS Variables / Theming
   ============================= */
:root {
    /* Light theme variables */
    --primary-bg: #ffffff;
    --primary-text: #333333;
    --secondary-bg: #f5f5f5;
    --accent-color: #4a90e2;
    --header-bg: #ffffff;
    --button-bg: #4a90e2;
    --button-text: #ffffff;
}

[data-theme="dark"] {
    /* Dark theme variables */
    --primary-bg: #1a1a1a;
    --primary-text: #ffffff;
    --secondary-bg: #2d2d2d;
    --accent-color: #64b5f6;
    --header-bg: #2d2d2d;
    --button-bg: #64b5f6;
    --button-text: #ffffff;
}

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

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

/* =============================
   Typography
   ============================= */
h1 {
    font-size: 2.2rem;
    margin: 0;
    color: var(--accent-color);
}

h2 {
    font-size: 1.6rem;
    margin-bottom: 0.75rem;
    color: var(--accent-color);
}

p {
    margin-bottom: 0.75rem;
}

p:last-child {
    margin-bottom: 0;
}

/* =============================
   Layout Components
   ============================= */
/* Header */
header {
    background-color: var(--header-bg);
    height: 80px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

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

section {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background-color: var(--secondary-bg);
    border-radius: 8px;
}

/* Footer */
footer {
    border-top: 1px solid var(--secondary-bg);
    margin-top: 1.5rem;
    padding: 1rem 0;
    text-align: center;
    font-size: 0.9rem;
    color: var(--primary-text);
    opacity: 0.8;
}

/* =============================
   UI Components
   ============================= */
/* Control Elements */
.controls {
    display: flex;
    gap: 1rem;
}

button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    background-color: var(--button-bg);
    color: var(--button-text);
    cursor: pointer;
    transition: opacity 0.3s ease;
}

button:hover {
    opacity: 0.9;
}

/* =============================
   Utility Classes
   ============================= */
.hidden {
    display: none;
}

/* =============================
   Media Queries
   ============================= */
@media (max-width: 768px) {
    header {
        height: auto;
        min-height: 80px;
        padding: 1rem 0;
    }

    .header-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    h1 {
        font-size: 2rem;
    }

    section {
        padding: 1.25rem;
        margin-bottom: 1.25rem;
    }

    .controls {
        gap: 0.5rem;
    }

    button {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }

    body {
        padding-top: 140px;
    }
}