/* ===================================
   CSS VARIABLES FOR THEMING
   =================================== */
:root,
:root[data-theme="light"] {
    --bg-primary: #F8F9FA;
    --bg-secondary: #FFFFFF;
    --bg-card: #FFFFFF;
    --card-bg-translucent: rgba(255, 255, 255, 0.78);
    --header-bg-translucent: rgba(255, 255, 255, 0.6);
    --glass-blur: blur(8px);
    --text-primary: #2C3E50;
    --text-secondary: #5A6C7D;
    --accent-primary: #4A7BA7;
    --accent-hover: #3A6590;
    --accent-pop: #FF6B35;
    --accent-pop-hover: #E55A28;
    /* hero / background overlays (use app accents) */
    --hero-overlay-1: rgba(74, 123, 167, 0.20); /* stronger tint from --accent-primary */
    --hero-overlay-2: rgba(255, 107, 53, 0.12);  /* stronger tint from --accent-pop */
    --border-color: #E1E8ED;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
}

:root[data-theme="dark"] {
    --bg-primary: #1A1D23;
    --bg-secondary: #22262E;
    --bg-card: #2A2F38;
    --card-bg-translucent: rgba(42, 47, 56, 0.62);
    --header-bg-translucent: rgba(34, 38, 46, 0.5);
    --glass-blur: blur(6px);
    --text-primary: #E8EAED;
    --text-secondary: #B8BBC0;
    --accent-primary: #6B9BD1;
    --accent-hover: #88AED9;
    --accent-pop: #FF6B35;
    --accent-pop-hover: #FF8555;
    /* hero / background overlays (darker variants for dark theme) */
    --hero-overlay-1: rgba(107, 155, 209, 0.18);
    --hero-overlay-2: rgba(255, 107, 53, 0.12);
    --border-color: #3A3F48;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) {
        --bg-primary: #1A1D23;
        --bg-secondary: #22262E;
        --bg-card: #2A2F38;
        --card-bg-translucent: rgba(42, 47, 56, 0.62);
        --header-bg-translucent: rgba(34, 38, 46, 0.5);
        --glass-blur: blur(6px);
        --text-primary: #E8EAED;
        --text-secondary: #B8BBC0;
        --accent-primary: #6B9BD1;
        --accent-hover: #88AED9;
        --accent-pop: #FF6B35;
        --accent-pop-hover: #FF8555;
        --hero-overlay-1: rgba(107, 155, 209, 0.18);
        --hero-overlay-2: rgba(255, 107, 53, 0.12);
        --border-color: #3A3F48;
        --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
        --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    }
}

/* ===================================
   RESET & BASE STYLES
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3 {
    font-weight: 600;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===================================
   THEME TOGGLE
   =================================== */
.theme-toggle {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background-color: var(--card-bg-translucent);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    padding: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    width: 56px;
    height: 56px;
    box-shadow: 0 0 15px rgba(255, 107, 53, 0.2);
    z-index: 1000;
    opacity: 0.8;
}

.theme-toggle:hover {
    background-color: var(--accent-pop);
    color: #FFFFFF;
    transform: scale(1.1) rotate(15deg);
    opacity: 1;
    box-shadow: 0 0 25px rgba(255, 107, 53, 0.4);
}

:root[data-theme="light"] .moon-icon,
:root:not([data-theme]) .moon-icon { display: none; }
:root[data-theme="dark"] .sun-icon { display: none; }
:root[data-theme="light"] .sun-icon,
:root:not([data-theme]) .sun-icon { display: block; }
:root[data-theme="dark"] .moon-icon { display: block; }

@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) .sun-icon { display: none; }
    :root:not([data-theme]) .moon-icon { display: block; }
}

/* ===================================
   FOOTER
   =================================== */
.footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 32px 0;
    text-align: center;
}

.footer p {
    color: var(--text-secondary);
    font-size: 14px;
}
