/* Base styles shared across all pages */

* {
    /* Display & Box Model */
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --page-parallax-image: url('../assets/Backgrounds/banner.png');
    --page-bg: transparent;
    --page-tint: transparent;
    --container-bg: linear-gradient(165deg, rgba(255, 255, 255, 0.74) 0%, rgba(247, 250, 255, 0.64) 52%, rgba(241, 246, 255, 0.72) 100%);
    --container-border: transparent;
    --container-inner-glow: rgba(255, 255, 255, 0.34);
    --container-shadow: 0 24px 70px rgba(15, 23, 42, 0.3), 0 0 30px rgba(37, 99, 235, 0.14);
    --header-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --header-text: #ffffff;
    --text-primary: #212529;
    --text-secondary: #495057;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    --link-color: #667eea;
    --toggle-bg: rgba(255, 255, 255, 0.92);
    --toggle-text: #1f2937;
    --toggle-border: rgba(31, 41, 55, 0.18);
    --page-image-filter: none;
    --page-image-opacity: 0.92;
}

html[data-theme='dark'] {
    --page-bg: linear-gradient(135deg, rgba(15, 23, 42, 0.48) 0%, rgba(30, 41, 59, 0.52) 100%);
    --page-tint: linear-gradient(135deg, rgba(2, 6, 23, 0.36) 0%, rgba(15, 23, 42, 0.42) 100%);
    --page-image-filter: brightness(0.7) saturate(0.9);
    --page-image-opacity: 1;
    --container-bg: linear-gradient(165deg, rgba(15, 23, 42, 0.68) 0%, rgba(15, 23, 42, 0.6) 52%, rgba(17, 28, 49, 0.66) 100%);
    --container-border: rgba(100, 116, 139, 0.38);
    --container-inner-glow: rgba(148, 163, 184, 0.08);
    --container-shadow: 0 24px 72px rgba(0, 0, 0, 0.62), 0 0 28px rgba(59, 130, 246, 0.18);
    --header-bg: linear-gradient(135deg, #1d4ed8 0%, #312e81 100%);
    --header-text: #e5e7eb;
    --text-primary: #f3f4f6;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --link-color: #93c5fd;
    --toggle-bg: rgba(15, 23, 42, 0.92);
    --toggle-text: #e2e8f0;
    --toggle-border: rgba(148, 163, 184, 0.28);
}

body {
    /* Display & Box Model */
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;

    /* Typography */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;

    /* Visual */
    background-color: #667eea;
    background-image: var(--page-tint), var(--page-bg);
    background-size: cover, cover;
    background-position: center center, center center;
    background-repeat: no-repeat, no-repeat;
    background-attachment: fixed, fixed;
    color: var(--text-primary);
    transition: background 0.25s ease, color 0.25s ease;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image: var(--page-parallax-image);
    background-size: 920px auto;
    background-position: center top;
    background-repeat: repeat;
    background-attachment: fixed;
    opacity: var(--page-image-opacity);
    filter: var(--page-image-filter);
}

html:not([data-theme='dark']) body {
    filter: none;
}

.container {
    /* Display & Box Model */
    width: min(96vw, 1400px);
    margin: 0 auto;
    overflow: hidden;
    border-radius: 12px;

    /* Visual */
    border: 1px solid var(--container-border);
    background: var(--container-bg);
    box-shadow: var(--container-shadow);
    transition: background 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

header {
    /* Display & Box Model */
    padding: 60px 30px;

    /* Typography */
    text-align: center;
    color: var(--header-text);

    /* Visual */
    background: var(--header-bg);
}

header h1 {
    /* Display & Box Model */
    margin-bottom: 10px;

    /* Typography */
    font-size: 2.5em;
}

header p {
    /* Typography */
    font-size: 1.1em;
    opacity: 0.9;
}


footer {
    /* Display & Box Model */
    padding: 20px 30px;
    border-top: 1px solid var(--border-color);

    /* Typography */
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9em;
}

footer a {
    /* Typography */
    color: var(--link-color);
    text-decoration: none;
}

.theme-toggle-btn {
    /* Positioning */
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 1100;

    /* Display & Box Model */
    padding: 3px;
    width: 68px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid var(--toggle-border);

    /* Display & Box Model */
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;

    /* Visual */
    background: var(--toggle-bg);
    opacity: 0.72;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.theme-toggle-btn:hover {
    transform: translateY(-1px);
    opacity: 1;
}

.theme-toggle-btn:focus-visible {
    outline: 2px solid var(--link-color);
    outline-offset: 2px;
    opacity: 1;
}

.theme-toggle-icon {
    /* Display & Box Model */
    width: 18px;
    height: 18px;

    /* Visual */
    object-fit: contain;
    pointer-events: none;
}

.theme-toggle-thumb {
    /* Display & Box Model */
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    /* Visual */
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.3);
    transform: translateX(0);
    transition: transform 0.2s ease;
}

html[data-theme='dark'] .theme-toggle-thumb {
    transform: translateX(30px);
    background: #334155;
    box-shadow: 0 1px 3px rgba(2, 6, 23, 0.65);
}

footer a:hover {
    /* Typography */
    text-decoration: underline;
}

@media (max-width: 768px) {
    header h1 {
        /* Typography */
        font-size: 1.8em;
    }

    header p {
        /* Typography */
        font-size: 1em;
    }
}

@media (min-width: 1400px) {
    body {
        /* Display & Box Model */
        padding: 30px 40px;
    }

    .container {
        /* Display & Box Model */
        width: min(94vw, 1600px);
    }
}