/* Design System & Variables */
:root {
    /* Color Palette - Premium & Modern */
    --primary-hue: 220;
    /* Deep Blue/Slate */
    --accent-hue: 160;
    /* Teal/Mint */

    --color-bg: hsl(var(--primary-hue), 20%, 98%);
    --color-surface: hsl(0, 0%, 100%);
    --color-surface-alt: hsl(var(--primary-hue), 10%, 96%);

    --color-text-main: hsl(var(--primary-hue), 40%, 15%);
    --color-text-muted: hsl(var(--primary-hue), 20%, 40%);
    --color-text-light: hsl(var(--primary-hue), 10%, 60%);

    --color-primary: hsl(var(--primary-hue), 90%, 45%);
    --color-primary-hover: hsl(var(--primary-hue), 90%, 35%);

    --color-accent: hsl(var(--accent-hue), 80%, 40%);
    --color-accent-hover: hsl(var(--accent-hue), 80%, 30%);

    --color-border: hsl(var(--primary-hue), 15%, 90%);

    /* Spacing - Increased for better breathing room */
    --space-xs: 0.75rem;
    --space-sm: 1.25rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 6rem;

    /* Typography */
    --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    --font-heading: 'Outfit', var(--font-sans);

    --text-xs: 0.875rem;
    --text-sm: 1rem;
    --text-base: 1.125rem;
    --text-lg: 1.25rem;
    --text-xl: 1.5rem;
    --text-2xl: 2rem;
    --text-3xl: 3rem;
    --text-4xl: 4.5rem;

    /* Shadows & Radius */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-premium: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition-base: all 0.2s ease-in-out;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Support (Optional but good for premium feel) */
@media (prefers-color-scheme: dark) {
    :root {
        --color-bg: hsl(var(--primary-hue), 30%, 10%);
        --color-surface: hsl(var(--primary-hue), 25%, 15%);
        --color-surface-alt: hsl(var(--primary-hue), 25%, 18%);

        --color-text-main: hsl(var(--primary-hue), 10%, 95%);
        --color-text-muted: hsl(var(--primary-hue), 10%, 70%);
        --color-text-light: hsl(var(--primary-hue), 10%, 50%);

        --color-border: hsl(var(--primary-hue), 20%, 25%);
    }
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    line-height: 1.2;
    font-weight: 700;
    color: var(--color-text-main);
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-base);
}

button {
    cursor: pointer;
    font-family: inherit;
}

img {
    max-width: 100%;
    display: block;
}

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

.block {
    display: block;
}

.flex-wrap {
    flex-wrap: wrap;
}

.gap-2 {
    gap: 0.5rem;
}

@media (min-width: 768px) {
    .md\:inline {
        display: inline !important;
    }
}

.inline-block {
    display: inline-block;
}

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.flex-1 {
    flex: 1 1 0%;
}

.col-span-full {
    grid-column: 1 / -1;
}

.flex-grow {
    flex-grow: 1;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mb-10 {
    margin-bottom: 2.5rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-8 {
    margin-top: 2rem;
}

.mt-10 {
    margin-top: 2.5rem;
}

.mt-auto {
    margin-top: auto;
}

.my-8 {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.mr-auto {
    margin-right: auto;
}

.ml-auto {
    margin-left: auto;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.max-w-2xl {
    max-width: 42rem;
}

.sticky {
    position: sticky;
}

.top-0 {
    top: 0;
}

.top-24 {
    top: 6rem;
}

.top-96 {
    top: 24rem;
}

.overflow-hidden {
    overflow: hidden;
}

.object-cover {
    object-fit: cover;
}

.container {
    width: 100%;
    max-width: 1280px;
    /* Wider container */
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-sm {
    gap: var(--space-sm);
}

.gap-md {
    gap: var(--space-md);
}

.gap-lg {
    gap: var(--space-lg);
}

.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, 1fr);
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

@media (min-width: 768px) {
    .md\:flex {
        display: flex !important;
    }

    .md\:hidden {
        display: none !important;
    }

    .md\:block {
        display: block !important;
    }

    .md\:flex-row {
        flex-direction: row;
    }

    .md\:flex-col {
        flex-direction: column;
    }

    .md\:w-auto {
        width: auto;
    }

    .md\:w-1\/4 {
        width: 25%;
    }

    .md\:w-1\/2 {
        width: 50%;
    }

    .md\:w-3\/4 {
        width: 75%;
    }

    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .md\:grid-cols-4 {
        grid-template-columns: repeat(4, 1fr);
    }

    .md\:text-5xl {
        font-size: 3rem;
    }

    .md\:text-4xl {
        font-size: 2.25rem;
    }

    .md\:text-4xl {
        font-size: 2.25rem;
    }

    .md\:inline-flex {
        display: inline-flex !important;
    }

    .md\:flex-wrap {
        flex-wrap: wrap !important;
    }
}

.text-xl {
    font-size: var(--text-xl);
}

.text-2xl {
    font-size: var(--text-2xl);
}

.text-3xl {
    font-size: var(--text-3xl);
}

.mobile-menu-btn {
    background: none;
    border: none;
    color: var(--color-text-main);
    font-size: 2rem;
    padding: 0.5rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.text-center {
    text-align: center;
}

.text-primary {
    color: var(--color-primary);
}

.text-accent {
    color: var(--color-accent);
}

.text-sm {
    font-size: var(--text-sm);
}

.text-muted {
    color: var(--color-text-muted);
}

.bg-surface {
    background-color: var(--color-surface);
}

.bg-primary {
    background-color: var(--color-primary);
    color: white;
}

.hero {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.7) 0%, rgba(30, 41, 59, 0.7) 100%), url('https://images.unsplash.com/photo-1497366216548-37526070297c?q=80&w=1920&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    color: white;
    padding: var(--space-xl) 0;
    text-align: center;
}

.p-md {
    padding: var(--space-md);
}

.py-lg {
    padding-top: var(--space-lg);
    padding-bottom: var(--space-lg);
}

.px-sm {
    padding-left: var(--space-sm);
    padding-right: var(--space-sm);
}

.rounded-md {
    border-radius: var(--radius-md);
}

.rounded-lg {
    border-radius: var(--radius-lg);
}

.shadow-md {
    box-shadow: var(--shadow-md);
}

.shadow-lg {
    box-shadow: var(--shadow-lg);
}

/* Components */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    transition: var(--transition-smooth);
    border: none;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
}

.btn-outline:hover {
    background-color: var(--color-primary);
    color: white;
}

.btn-outline:hover {
    background-color: var(--color-primary);
    color: white;
}

.btn-text {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    font: inherit;
    cursor: pointer;
    text-decoration: underline;
    color: var(--color-primary);
}

.btn-text:hover {
    color: var(--color-primary-hover);
    text-decoration: none;
}

/* Cards */
.card {
    background-color: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    padding: var(--space-md);
    transition: var(--transition-smooth);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-premium);
    border-color: var(--color-primary);
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-primary {
    background-color: hsl(var(--primary-hue), 90%, 95%);
    color: var(--color-primary);
}

.badge-accent {
    background-color: hsl(var(--accent-hue), 90%, 95%);
    color: var(--color-accent);
}

/* Navbar */
.navbar {
    background-color: rgba(255, 255, 255, 0.95);
    /* More solid for better visibility */
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    /* Ensure it stays on top */
    box-shadow: var(--shadow-sm);
}

.navbar nav a {
    position: relative;
    font-weight: 500;
    padding: 0.5rem 0;
    color: var(--color-text-main);
}

.navbar nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--color-primary);
    transition: width 0.3s ease;
}

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

.navbar nav a:hover::after {
    width: 100%;
}

@media (prefers-color-scheme: dark) {
    .navbar {
        background-color: rgba(15, 23, 42, 0.95);
    }
}

/* Footer */
footer {
    background-color: var(--color-text-main);
    /* Dark footer */
    color: rgb(8, 8, 8);
}

footer a {
    color: var(--color-text-light);
}

footer a:hover {
    color: white;
}

footer .text-muted {
    color: var(--color-text-light);
}

footer .border-t {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Ad Containers */
/* Ad Containers - Minimal styling to avoid layout issues */
.ad-container {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: var(--space-md) 0;
}

.ad-leaderboard {
    width: 100%;
    max-width: 728px;
    margin-left: auto;
    margin-right: auto;
}

.ad-sidebar {
    width: 100%;
    /* Medium Rectangle */
}

.ad-content {
    width: 100%;
    /* Or responsive height */
}

.ad-placeholder-text {
    color: var(--color-text-light);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Responsive Search Button */
@media (max-width: 768px) {
    .search-box .btn {
        width: 100%;
    }
}


/* Form Elements */
.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    outline: none;
    transition: var(--transition-base);
    background-color: var(--color-surface);
    color: var(--color-text-main);
}

.form-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-hue), 90%, 45%, 0.1);
}

/* Prose (Rich Text) */
.prose {
    max-width: 65ch;
    margin: 0 auto;
    line-height: 1.75;
}

.prose p {
    margin-bottom: 1.5rem;
}

.prose h2 {
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    font-size: 1.75rem;
    color: var(--color-text-main);
}

.prose h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: var(--color-text-main);
}

.prose ul,
.prose ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.prose li {
    margin-bottom: 0.5rem;
}

.prose a {
    color: var(--color-primary);
    text-decoration: underline;
}

.prose blockquote {
    border-left: 4px solid var(--color-primary);
    padding-left: 1rem;
    font-style: italic;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

/* Missing Utility Classes */
.w-full {
    width: 100%;
}

.h-32 {
    height: 8rem;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.gap-4 {
    gap: 1rem;
}

.font-medium {
    font-weight: 500;
}

.font-bold {
    font-weight: 700;
}

.text-sm {
    font-size: var(--text-sm);
}

.text-red-500 {
    color: #ef4444;
}

.bg-gray-50 {
    background-color: #f9fafb;
}

.border-gray-100 {
    border-color: #f3f4f6;
}

.block {
    display: block;
}