:root {
    --primary-color: #ff3b30;
    --primary-hover: #e0322a;

    /* Main Body Light Theme */
    --bg-color: #ffffff;
    --surface-color: #f5f5f7;
    --text-color: #1d1d1f;
    --text-secondary: #424245;

    /* Dark Header/Footer Override Variables */
    --header-bg: #000000;
    --footer-bg: #000000;
    --dark-text: #ffffff;
    --dark-text-secondary: #a0a0a0;

    --brand-red: #ff3b30;
    --glass-border: rgba(0, 0, 0, 0.1);
    --glass-border-dark: rgba(255, 255, 255, 0.1);
    --font-main: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* Make links in main content visible */
main a {
    color: var(--primary-color);
    font-weight: 500;
}

main a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Layout */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

/* Header - DARK MODE */
header {
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--header-bg);
    /* Removed backdrop-filter for pure opaque black */
    margin-bottom: 4rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    color: var(--dark-text);
    /* Force white text */
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none !important;
}

.logo-icon {
    height: 32px;
    width: auto;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1;
}

.text-red {
    color: var(--brand-red);
}

.text-white {
    color: #ffffff;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--dark-text-secondary);
    /* Light grey for dark header */
}

.nav-links a:hover {
    color: var(--dark-text);
    /* White on hover */
}

/* Typography & Content - LIGHT MODE (Inherits from body) */
h1,
h2,
h3,
h4 {
    color: var(--text-color);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-top: 0;
}

h2 {
    font-size: 1.8rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.5rem;
}

p,
ul,
ol {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

ul,
ol {
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
}

blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
    color: var(--text-color);
    font-style: italic;
    margin: 2rem 0;
    background: var(--surface-color);
    padding: 1rem;
    border-radius: 0 8px 8px 0;
}

code {
    background: var(--surface-color);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
    color: var(--primary-color);
    border: 1px solid var(--glass-border);
}

/* Components */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    background: var(--primary-color);
    color: white !important;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    margin-top: 1rem;
    font-size: 1rem;
}

.btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 59, 48, 0.3);
}

.card {
    background: #ffffff;
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.alert {
    background: rgba(255, 149, 0, 0.1);
    border: 1px solid #ff9500;
    color: #c45b00;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.app-logo {
    max-width: 200px;
    height: auto;
    margin: 2rem 0;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Footer - DARK MODE */
footer {
    border-top: 1px solid var(--glass-border-dark);
    padding: 3rem 0;
    background: var(--footer-bg);
    margin-top: auto;
    color: var(--dark-text-secondary);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--dark-text-secondary);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--dark-text);
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.2rem;
    }

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

    .nav-links {
        gap: 1rem;
    }
}