/* Google Fonts loaded async via base.html preload for performance */

:root {
    --bg: #f7f8fb;
    --surface: #ffffff;
    --surface-2: #f1f5f9;
    --border: #e5e7eb;
    --text: #0b1020;
    --muted: #475569;

    --brand: #4f46e5;
    --brand-2: #4338ca;
    --accent: #06b6d4;

    --shadow: 0 10px 24px rgba(16, 24, 40, 0.08);

    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(15, 23, 42, 0.08);
    --glass-hover: rgba(15, 23, 42, 0.04);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

::-webkit-scrollbar {
    display: none;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: none;
}

body {
    font-family: Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(1200px 800px at 10% -10%, rgba(6, 182, 212, 0.12), transparent 60%),
        radial-gradient(1200px 800px at 110% 10%, rgba(79, 70, 229, 0.12), transparent 60%),
        radial-gradient(1200px 800px at 50% 100%, rgba(244, 114, 182, 0.12), transparent 60%),
        var(--bg);
}

a {
    color: inherit;
    text-decoration: none;
}

.blocked {
    cursor: not-allowed;
}

.no-scroll {
    overflow: hidden;
}

.page-title {
    text-align: center;
    margin: 20px 0;
    font-size: 36px;
    color: var(--text);
}

.sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.navbar {
    font-family: "Roboto", sans-serif;
    position: sticky;
    top: 16px;
    z-index: 3000;

    width: min(1100px, calc(100% - 32px));
    margin: 16px auto 28px;
    padding: 10px 16px;

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

    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;

    box-shadow: 0 12px 30px rgba(16, 24, 40, 0.10);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.navbar .logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.navbar .logo img {
    height: 48px;
    width: auto;
    display: block;
    border-radius: 14px;
}

.navbar .nav-menu {
    list-style: none;
    display: flex;
    gap: 6px;
    align-items: center;
}

.navbar .nav-menu li {
    position: relative;
}

.navbar .nav-menu li a {
    display: inline-flex;
    align-items: center;

    color: var(--text);
    font-weight: 600;
    font-size: 16px;

    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid transparent;

    transition: background 0.2s ease, border-color 0.2s ease, transform 0.08s ease;
}

.navbar .nav-menu li a:hover {
    background: var(--glass-hover);
    border-color: var(--glass-border);
    transform: translateY(-1px);
}

.navbar a:focus-visible {
    outline: 2px solid rgba(6, 182, 212, 0.55);
    outline-offset: 3px;
    border-radius: 10px;
}

.navbar .nav-menu li a[aria-current="page"],
.navbar .nav-menu li a.active {
    box-shadow: inset 0 -2px 0 0 var(--brand);
}

.navbar .dropdown .dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;

    min-width: 240px;
    padding: 8px;

    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--border);
    border-radius: 14px;

    box-shadow: 0 14px 34px rgba(16, 24, 40, 0.14);
    z-index: 1001;

    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.navbar .dropdown:hover .dropdown-menu {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.navbar .dropdown .dropdown-menu li {
    list-style: none;
    margin: 0;
}

.navbar .dropdown .dropdown-menu li a {
    display: block;
    color: var(--text);
    font-size: 15px;

    padding: 10px 12px;
    border-radius: 10px;

    transition: background 0.18s ease, transform 0.06s ease;
}

.navbar .dropdown .dropdown-menu li a:hover {
    background: rgba(15, 23, 42, 0.04);
    transform: translateX(1px);
}

.flash-stack {
    position: fixed;
    left: 50%;
    top: 92px;
    transform: translateX(-50%);
    width: min(1100px, calc(100% - 32px));
    display: grid;
    gap: 10px;
    z-index: 2000;
    pointer-events: none;
}

.flash {
    pointer-events: auto;
    position: relative;

    border-radius: 14px;
    border: 1px solid var(--border);
    box-shadow: 0 12px 30px rgba(16, 24, 40, 0.10);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    overflow: hidden;

    opacity: 0;
    transform: translateX(18px);
    animation: flash-in 180ms ease forwards;
}

@keyframes flash-in {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.flash-hide {
    animation: flash-out 200ms ease forwards;
}

@keyframes flash-out {
    to {
        opacity: 0;
        transform: translateX(18px);
    }
}

.flash-inner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
}

.flash-icon {
    font-size: 18px;
    line-height: 1;
    margin-top: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.flash-text {
    margin: 0;
    line-height: 1.35;
    font-weight: 600;
    color: var(--text);
    padding-right: 44px;
}

.flash-close {
    position: absolute;
    right: 10px;
    top: 4px;

    width: 40px;
    height: 40px;
    border-radius: 12px;

    border: 1px solid rgba(15, 23, 42, 0.12);
    /* background: rgba(255, 255, 255, 0.65); */

    display: inline-flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    color: #ef4444;
    opacity: 1;

    transition: background 0.15s ease, transform 0.08s ease, filter 0.15s ease;
}

.flash-close i {
    font-size: 18px;
    line-height: 1;
}

.flash-close:hover {
    background: rgba(255, 255, 255, 0.85);
    filter: brightness(1.02);
}

.flash-close:active {
    transform: scale(0.98);
}

.flash-close:focus-visible {
    outline: 2px solid rgba(6, 182, 212, 0.55);
    outline-offset: 3px;
}

.flash-success {
    background: rgba(34, 197, 94, 0.14);
    border-color: rgba(34, 197, 94, 0.25);
}

.flash-error {
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.28);
}

.flash-warning {
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.26);
}

.flash-info {
    background: rgba(59, 130, 246, 0.14);
    border-color: rgba(59, 130, 246, 0.24);
}

.flash-success .flash-icon {
    color: #16a34a;
}

.flash-error .flash-icon {
    color: #ef4444;
}

.flash-warning .flash-icon {
    color: #d97706;
}

.flash-info .flash-icon {
    color: #2563eb;
}

.hamburger-icon {
    display: none;
    cursor: pointer;
    width: 30px;
    height: 24px;
    position: relative;
    z-index: 1001;
    padding: 0;
    border: 0;
    color: inherit;
}

.hamburger-icon .btn-line {
    background-color: var(--text);
    height: 4px;
    width: 100%;
    margin: 4px 0;
    transition: all 0.4s ease;
    border-radius: 2px;
    position: relative;
}

.hamburger-icon.close .btn-line {
    background-color: #ef4444;
}

.hamburger-icon.close .btn-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-icon.close .btn-line:nth-child(2) {
    opacity: 0;
}

.hamburger-icon.close .btn-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.mobile-menu {
    font-family: "Roboto", sans-serif;
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100%;

    background: var(--glass-bg);
    border-left: 1px solid var(--glass-border);
    box-shadow: -12px 0 30px rgba(16, 24, 40, 0.16);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);


    z-index: 3600;
    transition: right 0.3s ease;

    padding: 60px 20px 20px;
    font-weight: 300;
    overflow-y: auto;
}

.mobile-menu.open {
    right: 0;
}

.mobile-menu ul {
    list-style: none;
}

.mobile-menu ul li {
    margin-bottom: 20px;
}

.mobile-menu ul li a {
    color: var(--text);
    font-size: 20px;
    display: block;
}

.mobile-menu ul li a:hover {
    color: var(--brand);
}

.mobile-menu .mobile-menu-heading {
    font-size: 22px;
    font-weight: 700;
    color: var(--brand);
    margin-bottom: 10px;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
    padding-bottom: 5px;
}

#overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.45);
    z-index: 3500;
    display: none;
}

#overlay.active {
    display: block;
}

.layout {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr) 160px;
    gap: 16px;

    width: min(1400px, calc(100% - 32px));
    margin: 0 auto 48px;

    align-items: start;
}

.layout.layout-no-ads {
    grid-template-columns: minmax(0, 1fr);
    width: min(1100px, calc(100% - 32px));
}

.content {
    min-width: 0;
}

.legal-page,
.error-page {
    width: min(900px, 100%);
    margin: 0 auto;
}

.legal-card,
.error-card {
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.legal-card {
    padding: 32px;
}

.legal-eyebrow,
.error-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(79, 70, 229, 0.10);
    color: var(--brand-2);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.legal-card h1 {
    margin-top: 18px;
    font-size: clamp(32px, 4vw, 44px);
    line-height: 1.1;
}

.legal-updated {
    margin-top: 10px;
    color: var(--muted);
    font-weight: 600;
}

.legal-card p,
.legal-card li,
.error-copy,
.error-message {
    color: var(--muted);
    font-size: 16px;
    line-height: 1.75;
}

.legal-section {
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.legal-section h2 {
    margin-bottom: 14px;
    font-size: 24px;
    line-height: 1.3;
}

.legal-section h3 {
    margin: 20px 0 10px;
    font-size: 18px;
    line-height: 1.4;
}

.legal-card ul {
    margin: 14px 0 0 22px;
}

.legal-card li + li {
    margin-top: 8px;
}

.legal-card a,
.error-home-link {
    color: var(--brand);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.legal-card a:hover,
.error-home-link:hover {
    color: var(--brand-2);
}

.error-page {
    min-height: calc(100vh - 260px);
    display: grid;
    place-items: center;
    padding: 24px 0 40px;
}

.error-card {
    width: min(680px, 100%);
    padding: 40px 32px;
    text-align: center;
}

.error-code {
    margin-top: 18px;
    font-size: clamp(72px, 14vw, 140px);
    line-height: 0.95;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text);
}

.error-message {
    margin-top: 14px;
    font-size: clamp(20px, 3vw, 28px);
    color: var(--text);
    font-weight: 700;
    line-height: 1.3;
}

.error-copy {
    margin-top: 12px;
}

.error-home-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 24px;
    padding: 12px 18px;
    border-radius: 12px;
    border: 1px solid rgba(79, 70, 229, 0.22);
    background: rgba(79, 70, 229, 0.08);
    text-decoration: none;
    font-weight: 700;
}

.ad-slot {
    position: sticky;
    top: 20%;
    height: fit-content;
}

.ad-container {
    width: 160px;
    min-height: 600px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.16);
    background: rgba(255, 255, 255, 0.72);
    display: grid;
    place-items: stretch;
    overflow: hidden;
}

.ad-unit {
    min-height: 600px;
}

.ad-unit-fallback {
    background:
        linear-gradient(135deg, rgba(79, 70, 229, 0.14), rgba(6, 182, 212, 0.12));
}

.cookie-consent-banner {
    position: fixed;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);

    background: var(--glass-bg);
    color: var(--text);

    padding: 18px 20px;
    border-radius: 16px;
    font-size: 15px;

    z-index: 500;
    box-shadow: var(--shadow);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(8px);

    max-width: 680px;
    width: min(94%, 680px);
    text-align: left;
    line-height: 1.5;
}

.cookie-consent-banner h3 {
    margin: 0 0 6px;
    font-size: 1.05rem;
}

.cookie-consent-copy {
    margin: 0;
    color: var(--muted);
}

.cookie-preference-list {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.cookie-option {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 12px;
    padding: 10px 12px;
}

.cookie-option strong {
    display: block;
    margin-bottom: 2px;
}

.cookie-option small {
    display: block;
    color: var(--muted);
    line-height: 1.35;
}

.cookie-option input[type="checkbox"] {
    margin-top: 3px;
}

.cookie-consent-banner button {
    margin: 0;
    padding: 9px 14px;
    border: 1px solid transparent;
    color: #fff;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: transform 0.2s ease, opacity 0.2s ease, filter 0.2s ease;
}

.cookie-consent-banner button.accept {
    background: #16a34a;
}

.cookie-consent-banner button.reject {
    background: #ef4444;
}

.cookie-consent-banner button.save {
    background: #3b82f6;
}

.cookie-consent-banner button:hover {
    transform: scale(1.05);
    opacity: 0.95;
}

.cookie-consent-actions {
    margin-top: 12px;
    display: flex;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: wrap;
}

footer {
    background-color: #0f172a;
    color: #e5e7eb;
    padding: 50px 0 20px;
    font-family: Arial, sans-serif;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;

    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-section {
    flex: 1;
    min-width: 250px;
    margin-bottom: 30px;
}

.footer-section h3 {
    color: #ffffff;
    font-size: 1.2em;
    margin-bottom: 20px;
    position: relative;
}

.footer-section h3::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 30px;
    height: 2px;
    background-color: var(--brand);
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: rgba(229, 231, 235, 0.78);
    transition: color 0.2s ease;
}

.footer-section ul li a:hover {
    color: #ffffff;
}

.footer-section ul li a i {
    margin-right: 8px;
    color: var(--brand);
}

.social-links {
    margin-bottom: 20px;
}

.social-links a {
    display: inline-block;
    width: 35px;
    height: 35px;

    background-color: rgba(255, 255, 255, 0.10);
    color: #ffffff;

    text-align: center;
    line-height: 35px;
    border-radius: 50%;
    margin-right: 10px;

    transition: transform 0.2s ease, filter 0.2s ease, background 0.2s ease;
}

.social-links a:hover {
    background-color: rgba(255, 255, 255, 0.16);
    transform: translateY(-3px);
}

.connect h3 {
    color: #ffffff;
    font-size: 1.2em;
    margin-bottom: 20px;
    position: relative;
}

.connect h3::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 30px;
    height: 2px;
    background-color: var(--brand);
}

.connect p {
    margin: 10px 0;
    font-size: 16px;
    color: rgba(229, 231, 235, 0.78);
    display: flex;
    align-items: center;
    gap: 10px;
}

.connect p i {
    color: var(--brand);
}

.connect p a {
    color: rgba(229, 231, 235, 0.78);
    transition: color 0.2s ease;
}

.connect p a:hover {
    color: #ffffff;
}

.footer-bottom {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    position: relative;
}

.footer-bottom p {
    margin: 6px 0;
}

.footer-bottom a {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.back-to-top {
    position: absolute;
    right: 20px;
    bottom: 20px;

    background-color: var(--brand);
    color: #ffffff;

    width: 40px;
    height: 40px;

    text-align: center;
    line-height: 40px;
    border-radius: 50%;

    transition: filter 0.2s ease;
}

.back-to-top:hover {
    filter: brightness(1.05);
}

@media (max-width: 1100px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .ad-slot {
        display: none;
    }
}

@media (max-width: 768px) {
    .navbar {
        width: calc(100% - 24px);
        margin: 12px auto 20px;
        padding: 10px 12px;
        border-radius: 14px;
    }

    .navbar .nav-menu {
        flex-direction: row;
        width: auto;
        margin-top: 0;
    }

    .navbar .nav-menu {
        display: none;
    }

    .flash-stack {
        top: 76px;
        width: calc(100% - 24px);
    }

    .hamburger-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;

        width: 44px;
        height: 44px;
        border-radius: 12px;

        background: var(--glass-bg);
        border: 1px solid var(--glass-border);
        box-shadow: 0 10px 24px rgba(16, 24, 40, 0.10);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);

        z-index: 1002;
    }

    .hamburger-icon .btn-line {
        width: 20px;
        height: 2px;
        margin: 3px 0;
        border-radius: 999px;
        background: var(--text);
    }

    .hamburger-icon:hover {
        background: var(--glass-hover);
    }

    .hamburger-icon.close .btn-line:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px);
    }

    .hamburger-icon.close .btn-line:nth-child(3) {
        transform: rotate(-45deg) translate(8px, -8px);
    }

    .footer-container {
        flex-direction: column;
    }

    .footer-section {
        margin-bottom: 30px;
    }

    .back-to-top {
        right: 10px;
        bottom: 50px;
    }

    .legal-card,
    .error-card {
        padding: 24px 20px;
        border-radius: 20px;
    }

    .legal-section {
        margin-top: 24px;
        padding-top: 20px;
    }

    .cookie-consent-actions {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0b1020;
        --surface: rgba(255, 255, 255, 0.06);
        --surface-2: rgba(255, 255, 255, 0.08);
        --border: rgba(255, 255, 255, 0.12);
        --text: #e6e8ef;
        --muted: #b8bdc9;

        --glass-bg: rgba(255, 255, 255, 0.06);
        --glass-border: rgba(255, 255, 255, 0.12);
        --glass-hover: rgba(255, 255, 255, 0.10);

        --shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
    }

    body {
        color: var(--text);
        background:
            radial-gradient(1200px 800px at 10% -10%, rgba(6, 182, 212, 0.18), transparent 60%),
            radial-gradient(1200px 800px at 110% 10%, rgba(79, 70, 229, 0.20), transparent 60%),
            radial-gradient(1200px 800px at 50% 100%, rgba(244, 114, 182, 0.20), transparent 60%),
            var(--bg);
    }

    .navbar {
        background: var(--glass-bg);
        border-color: var(--glass-border);
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    }

    .navbar .nav-menu li a {
        color: var(--text);
    }

    .navbar .nav-menu li a:hover {
        background: var(--glass-hover);
        border-color: var(--glass-border);
    }

    .navbar .dropdown .dropdown-menu {
        background: rgba(13, 17, 32, 0.86);
        border-color: var(--glass-border);
        box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
    }

    .navbar .dropdown .dropdown-menu li a {
        color: var(--text);
    }

    .navbar .dropdown .dropdown-menu li a:hover {
        background: rgba(255, 255, 255, 0.08);
    }

    .hamburger-icon .btn-line {
        background-color: var(--text);
    }

    .mobile-menu {
        background: rgba(13, 17, 32, 0.92);
        border-left-color: var(--glass-border);
        box-shadow: -2px 0 14px rgba(0, 0, 0, 0.35);
    }

    .mobile-menu ul li a {
        color: var(--text);
    }

    .mobile-menu ul li a:hover {
        color: #93c5fd;
    }

    .ad-container {
        border-color: rgba(255, 255, 255, 0.22);
        background: rgba(255, 255, 255, 0.04);
    }

    .ad-unit-fallback {
        background:
            linear-gradient(135deg, rgba(79, 70, 229, 0.22), rgba(6, 182, 212, 0.2));
    }

    .legal-card,
    .error-card {
        background: rgba(13, 17, 32, 0.72);
        border-color: var(--glass-border);
    }

    .legal-eyebrow,
    .error-kicker {
        background: rgba(147, 197, 253, 0.12);
        color: #bfdbfe;
    }

    .legal-card p,
    .legal-card li,
    .error-copy {
        color: var(--muted);
    }

    .legal-section {
        border-top-color: var(--border);
    }

    .error-home-link {
        background: rgba(147, 197, 253, 0.10);
        border-color: rgba(147, 197, 253, 0.22);
        color: #bfdbfe;
    }

    .cookie-consent-banner {
        background: rgba(13, 17, 32, 0.92);
        color: var(--text);
        border-color: var(--glass-border);
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    }

    footer {
        background-color: #0b1020;
        color: var(--text);
    }

    .footer-section ul li a,
    .connect p,
    .connect p a {
        color: rgba(230, 232, 239, 0.72);
    }

    .footer-section ul li a:hover,
    .connect p a:hover {
        color: #ffffff;
    }

    .social-links a {
        background-color: rgba(255, 255, 255, 0.10);
    }

    .social-links a:hover {
        background-color: rgba(255, 255, 255, 0.16);
    }

    .footer-bottom {
        border-top-color: rgba(255, 255, 255, 0.12);
    }

    .flash-close {
        background: rgba(13, 17, 32, 0.55);
        border-color: rgba(255, 255, 255, 0.12);
    }

    .flash-close:hover {
        background: rgba(13, 17, 32, 0.75);
    }
}
