﻿/* === css/base.css === */
/* BASE / GLOBAL */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

:root {
    /* Text */
    --text-primary-soft: #edf3ff;
    --text-primary-strong: #f4f7ff;
    --text-secondary: #a8b4d0;
    --text-muted: #6e7d9e;

    /* Accent colors вЂ” consistent palette */
    --accent-blue: #5b9eff;
    --accent-purple: #a86cff;
    --accent-cyan: #4fd8f0;
    --accent-green: #4cc98e;
    --accent-gold: #f5c842;

    /* Surfaces */
    --surface-0: #060b18;
    --surface-1: #0b1120;
    --surface-2: #111b30;
    --border-subtle: rgba(140, 170, 255, 0.14);
    --border-medium: rgba(140, 170, 255, 0.24);
}

html,
body {
    min-height: 100%;
    min-width: 320px;
    margin: 0;
}

html {
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

body {
    min-width: 320px;
    min-height: 100vh;
    color: var(--text-primary-soft);
    background: #0d1728;
    /* Р“Р»РѕР±Р°Р»СЊРЅРѕРµ РјСЏРіРєРѕРµ СЃРІРµС‡РµРЅРёРµ РґР»СЏ РІСЃРµРіРѕ С‚РµРєСЃС‚Р°.
       0 0 18px вЂ” Р»С‘РіРєР°СЏ СЃРёРЅРµРІР°С‚Р°СЏ СЃРІРµС‚РёРјРѕСЃС‚СЊ (РіР»СѓР±РёРЅР°),
       0 1px 2px вЂ” С‚РѕРЅРєР°СЏ С‚РµРЅСЊ СЃРЅРёР·Сѓ (РІРµСЃ/РѕСЃСЏР·Р°РµРјРѕСЃС‚СЊ). */
    text-shadow:
        0 0 24px rgba(140, 185, 255, 0.22),
        0 1px 3px rgba(0, 0, 0, 0.32);
}

.page {
    position: relative;
    z-index: 1;
    min-width: 320px;
    min-height: 100vh;
    padding: 8px 20px 40px;
}

.container {
    width: min(1100px, calc(100% - 40px));
    margin: 0 auto;
}

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

@media (max-width: 900px) {
    .page {
        padding: 6px 12px 20px;
    }

    .container {
        width: min(1100px, calc(100% - 10px));
    }
}

#result {
    margin-top: 18px;
}

.placeholder-text {
    text-align: center;
    color: #b9c3e0;
    font-size: 22px;
    padding: 30px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
}

/* === css/nav.css === */
/* TOP NAVIGATION */
.top-nav {
    position: relative;
    z-index: 40;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    width: 100vw;
    max-width: none;
    min-height: 72px;
    margin: -8px 0 28px 50%;
    padding: 0 max(28px, calc((100vw - 1280px) / 2 + 28px));
    transform: translateX(-50%);
    border-radius: 0;
    background: rgba(7, 12, 25, 0.78);
    border: 1px solid rgba(176, 190, 220, 0.16);
    box-shadow:
        0 14px 34px rgba(0, 0, 0, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.nav-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 240px;
    min-width: 0;
}

.nav-logo-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(176, 190, 220, 0.14);
    overflow: hidden;
}

.nav-logo-icon img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    display: block;
}

.nav-brand-text {
    color: #f5f7ff;
    font-size: 18px;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: 0;
    white-space: nowrap;
}

.nav-center {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex: 0 1 auto;
    min-width: 0;
}

.nav-link {
    position: relative;
    color: rgba(226, 232, 248, 0.72);
    text-decoration: none;
    font-size: 17px;
    line-height: 1;
    font-weight: 700;
    padding: 11px 14px;
    border-radius: 0;
    border: 1px solid transparent;
    background: transparent;
    box-shadow: none;
    transition:
        color 0.18s ease,
        background-color 0.18s ease,
        border-color 0.18s ease;
}

.nav-link:hover {
    color: #f5f7ff;
    background: rgba(255, 255, 255, 0.045);
    border-color: rgba(176, 190, 220, 0.10);
}

.nav-link.active::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 5px;
    height: 2px;
    border-radius: 0;
    background: rgba(126, 170, 255, 0.78);
}

.nav-link.active {
    color: #f5f7ff;
    background: rgba(126, 170, 255, 0.10);
    border-color: rgba(126, 170, 255, 0.18);
}

.nav-right {
    position: relative;
    z-index: 41;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 1 1 240px;
    min-width: 0;
}

.top-nav .creators-support {
    justify-content: flex-end;
}

.top-nav .creators-support-button {
    min-height: 42px;
    padding: 9px 14px;
    border-radius: 0;
    border: 1px solid rgba(176, 190, 220, 0.16);
    background: rgba(255, 255, 255, 0.035);
    box-shadow: none;
    color: rgba(226, 232, 248, 0.86);
    font-size: 16px;
    font-weight: 750;
}

.top-nav .creators-support-button:hover {
    transform: none;
    border-color: rgba(176, 190, 220, 0.26);
    background: rgba(255, 255, 255, 0.055);
    box-shadow: none;
    color: #f5f7ff;
}

@media (max-width: 980px) {
    .top-nav {
        min-height: auto;
        flex-wrap: wrap;
        gap: 12px 14px;
        padding: 12px max(18px, calc((100vw - 1280px) / 2 + 18px));
    }

    .nav-logo {
        flex: 1 1 auto;
    }

    .nav-center {
        order: 3;
        flex: 1 1 100%;
        justify-content: flex-start;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .nav-center::-webkit-scrollbar {
        display: none;
    }

    .nav-right {
        flex: 0 0 auto;
    }
}

@media (max-width: 640px) {
    .top-nav {
        width: 100vw;
        max-width: 100vw;
        margin: -8px 0 20px 50%;
        padding: 10px 12px;
        border-radius: 0;
        transform: none;
        translate: -50% 0;
    }

    .nav-logo-icon {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
    }

    .nav-logo-icon img {
        width: 29px;
        height: 29px;
    }

    .nav-brand-text {
        font-size: 16px;
    }

    .nav-link {
        font-size: 15px;
        padding: 8px 10px;
    }

    .top-nav .creators-support-button span {
        display: none;
    }

    .top-nav .creators-support-caret {
        display: none;
    }

    .top-nav .creators-support-button {
        width: 38px;
        padding: 6px;
        justify-content: center;
        min-height: 36px;
    }

    /* Stack and simplify layout so links don't overflow */
    .nav-logo { order: 1; flex: 0 0 auto; }
    .nav-right { order: 2; flex: 0 0 auto; }
    .nav-center { order: 3; flex: 1 1 100%; justify-content: space-around; overflow-x: visible; }

    /* Prevent page-level horizontal overflow introduced by older centering technique */
    body { overflow-x: hidden; }
}

/* === css/analyzer.css === */
/* ANALYZER PAGE STYLES */
body.analyzer-page {
    position: relative;
    background-color: #08111f;
    background-image:
        radial-gradient(circle at 14% 18%, rgba(164, 92, 255, 0.16), transparent 28%),
        radial-gradient(circle at 84% 14%, rgba(88, 190, 255, 0.11), transparent 24%),
        radial-gradient(circle at 68% 72%, rgba(126, 105, 255, 0.10), transparent 30%),
        linear-gradient(
            180deg,
            #050914 0%,
            #07101f 38%,
            #08111f 100%
        );
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    overflow-x: hidden;
}

body.analyzer-page::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 18% 30%, rgba(180, 116, 255, 0.18), transparent 34%),
        radial-gradient(ellipse at 78% 22%, rgba(90, 190, 255, 0.13), transparent 30%),
        radial-gradient(ellipse at 58% 88%, rgba(116, 82, 255, 0.12), transparent 36%);
    filter: blur(20px);
    opacity: 0.75;
}

body.analyzer-page .page {
    display: flex;
    align-items: flex-start;
    position: relative;
    z-index: 1;
}

.home-page.analyzer-page::after {
    content: none;
}

.analyzer-hero::after {
    content: none;
}

.analyzer-hero {
    display: block;
    min-height: auto;
    padding: 40px 0 20px;
}

.analyzer-hero .hero-left {
    max-width: 760px;
}

.analyzer-hero .hero-title {
    max-width: 760px;
    font-size: 64px;
    line-height: 1.05;
    margin-bottom: 18px;
}

.analyzer-hero .hero-subtitle {
    max-width: 760px;
    font-size: 20px;
    line-height: 1.6;
    margin-bottom: 26px;
}

.analyzer-search {
    max-width: 760px;
}

.analyzer-search-section {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 36px 0 28px;
}

.analyzer-search-centered {
    width: 100%;
    max-width: 820px;
}

#result > h1 {
    margin: 8px 0 10px;
    color: #f4f7ff;
    font-size: 34px;
    line-height: 1.15;
}

#result > p {
    margin: 0 0 10px;
    color: #bac6e6;
    font-size: 16px;
    line-height: 1.65;
}

body.analyzer-page.analyzer-booting #result > h1,
body.analyzer-page.analyzer-booting #result > p {
    display: none;
}

.result-page-title {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* Critical mobile CLS guard: reserve result height before deferred CSS and data arrive. */
@media (max-width: 768px) {
    body.analyzer-page {
        --result-mobile-reserved-height: 5400px;
    }

    body.analyzer-page #result {
        min-height: var(--result-mobile-reserved-height);
    }

    body.analyzer-page .analysis-loading-screen,
    body.analyzer-page .placeholder-text {
        min-height: calc(var(--result-mobile-reserved-height) - 140px);
    }

    body.analyzer-page .site-footer {
        min-height: 230px;
        margin-top: 14px;
    }

    body.analyzer-page #result:has(.info-panel.player-panel) {
        min-height: 0;
    }

    body.analyzer-page #result:has(.analysis-loading-screen) {
        min-height: 0;
    }

    body.analyzer-page .analysis-loading-screen {
        min-height: clamp(560px, 82svh, 760px);
    }
}

@media (max-width: 430px) {
    body.analyzer-page {
        --result-mobile-reserved-height: 5600px;
    }
}

/* === css/loading.css === */
/* LOADING SCREEN STYLES */
.analysis-loading-screen {
    position: relative;
    min-height: 620px;
    padding: 72px 40px 80px;
    border-radius: 36px;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 12%, rgba(118, 205, 255, 0.18), transparent 26%),
        radial-gradient(circle at 16% 20%, rgba(255, 206, 98, 0.10), transparent 24%),
        radial-gradient(circle at 84% 18%, rgba(106, 136, 255, 0.14), transparent 22%),
        linear-gradient(180deg, rgba(10, 18, 38, 0.94), rgba(5, 10, 22, 0.98));
    border: 1px solid rgba(132, 184, 255, 0.20);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 28px 70px rgba(2, 6, 18, 0.42),
        0 0 28px rgba(88, 154, 255, 0.10);
}

.analysis-loading-orbit {
    position: absolute;
    border-radius: 999px;
    border: 1px solid rgba(132, 190, 255, 0.08);
    pointer-events: none;
}

.analysis-loading-orbit--one {
    inset: 68px 160px 150px;
    transform: rotate(5deg);
}

.analysis-loading-orbit--two {
    inset: 124px 240px 218px;
    transform: rotate(-9deg);
}

.analysis-loading-hourglass-wrap {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 270px;
}

.analysis-loading-hourglass {
    position: relative;
    width: 312px;
    height: 360px;
    display: flex;
    align-items: center;
    justify-content: center;
    will-change: transform, filter;
}

.analysis-loading-hourglass-frame,
.analysis-loading-hourglass-glow,
.analysis-loading-hourglass-canvas {
    position: absolute;
    inset: 0;
}

.analysis-loading-hourglass-frame {
    border-radius: 32px;
    background:
        radial-gradient(circle at 50% 50%, rgba(106, 179, 255, 0.08), transparent 46%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0));
    border: 1px solid rgba(146, 198, 255, 0.16);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 0 40px rgba(116, 182, 255, 0.05),
        0 0 36px rgba(90, 161, 255, 0.08);
}

.analysis-loading-hourglass-glow {
    border-radius: 32px;
    background:
        radial-gradient(circle at 50% 18%, rgba(151, 223, 255, 0.18), transparent 26%),
        radial-gradient(circle at 50% 82%, rgba(255, 205, 119, 0.12), transparent 22%);
    filter: blur(22px);
    opacity: 0.9;
}

.analysis-loading-hourglass-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.analysis-loading-copy {
    position: relative;
    z-index: 2;
    width: min(760px, 100%);
    margin: 12px auto 0;
    text-align: center;
    will-change: text-shadow;
}

.analysis-loading-eyebrow {
    margin-bottom: 16px;
    color: #92cfff;
    font-size: 14px;
    font-family: Arial, sans-serif;
    letter-spacing: 0.28em;
    text-transform: uppercase;
}

.analysis-loading-title {
    color: #f8fbff;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.02;
    font-family: Arial, sans-serif;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.analysis-loading-subtitle {
    width: min(620px, 100%);
    margin: 20px auto 0;
    color: #b6c8ea;
    font-size: 17px;
    line-height: 1.65;
}

.analysis-loading-spark-layer {
    position: absolute;
    inset: -16px;
    overflow: hidden;
    pointer-events: none;
}

.analysis-loading-spark {
    position: absolute;
    left: 0;
    top: 0;
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(255, 242, 195, 0.98) 0%, rgba(255, 211, 109, 0.88) 42%, rgba(120, 196, 255, 0.12) 100%);
    box-shadow:
        0 0 14px rgba(255, 219, 126, 0.24),
        0 0 24px rgba(117, 204, 255, 0.14);
    opacity: 0;
    will-change: transform, opacity;
}

