/* =================================
    CSS VARIABLES (Light & Dark Mode)
    ================================= */
:root {
    /* Light Mode */
    --body-background: #f8f8f8;
    --main-text-color: #555;
    --heading-color: #2c3e50;
    --strong-color: #2c3e50;
    --page-content-background: #fff;
    --page-content-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Dark Mode - Activated by System Preference or Manual Toggle */
@media (prefers-color-scheme: dark) {
    :root {
        --body-background: #1a1a1a;
        --main-text-color: #ccc;
        --heading-color: #e0e0e0;
        --strong-color: #e0e0e0;
        --page-content-background: #2a2a2a;
        --page-content-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    }
}

body[data-theme='dark'] {
    /* Manual Dark Mode Override */
    --body-background: #1a1a1a;
    --main-text-color: #ccc;
    --heading-color: #e0e0e0;
    --strong-color: #e0e0e0;
    --page-content-background: #2a2a2a;
    --page-content-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* =================================
    General Styling
    ================================= */
/* This is a crucial fix to ensure the background fills the entire page */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--body-background);
    color: var(--main-text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* --- Typography --- */
h2 {
    color: var(--heading-color);
    font-size: 2em;
    transition: color 0.3s ease;
}

p {
    line-height: 1.6;
    margin-bottom: 1em;
}

strong {
    color: var(--strong-color);
    transition: color 0.3s ease;
}

/* --- Page Layout --- */
.page-wrapper {
    min-height: calc(100vh - 120px);
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
}

.page-content {
    max-width: 900px;
    background-color: var(--page-content-background);
    color: var(--main-text-color);
    margin: 80px auto 0px auto;
    padding: 40px;
    border-radius: 8px;
    box-shadow: var(--page-content-shadow);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}