/* =========================================================
   Alphanso AI — Global Premium Dark UI
   Replace: static/style.css
========================================================= */

:root {
    color-scheme: dark;
    --bg: #050914;
    --bg-2: #08101f;
    --panel: rgba(9, 15, 31, 0.92);
    --panel-2: rgba(13, 23, 44, 0.86);
    --panel-3: rgba(2, 8, 20, 0.78);
    --border: rgba(0, 212, 255, 0.16);
    --border-strong: rgba(0, 212, 255, 0.34);
    --text: #edf7ff;
    --muted: #94a3b8;
    --muted-2: #64748b;
    --accent: #00d4ff;
    --accent-2: #33ffca;
    --accent-3: #7c3cff;
    --danger: #ff4d6d;
    --success: #3dff9d;
    --warning: #ffbf47;
    --radius-xl: 30px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --shadow-lg: 0 26px 70px rgba(0, 0, 0, 0.42);
    --shadow-cyan: 0 0 36px rgba(0, 212, 255, 0.16);
    --font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
    background: var(--bg) !important;
}

body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-family: var(--font);
    color: var(--text) !important;
    background:
        radial-gradient(circle at 20% 10%, rgba(0, 212, 255, 0.12), transparent 28%),
        radial-gradient(circle at 85% 20%, rgba(124, 60, 255, 0.10), transparent 30%),
        radial-gradient(circle at 50% 90%, rgba(51, 255, 202, 0.06), transparent 36%),
        linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px),
        linear-gradient(180deg, #050914 0%, #07111f 55%, #050914 100%) !important;
    background-size:
        auto,
        auto,
        auto,
        44px 44px,
        44px 44px,
        auto !important;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 50% 0%, rgba(0, 212, 255, 0.08), transparent 40%);
    z-index: -1;
}

::selection {
    background: rgba(0, 212, 255, 0.28);
    color: #fff;
}

a {
    color: inherit;
}

button,
input,
textarea,
select {
    font: inherit;
}

img {
    max-width: 100%;
}

/* =========================================================
   Header / Navbar
========================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1020;
    backdrop-filter: blur(22px);
    background: rgba(4, 9, 20, 0.82) !important;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
}

.navbar-main {
    padding: 0.95rem 0;
}

.navbar-brand {
    font-weight: 800;
    letter-spacing: 0.035em;
    color: #fff !important;
}

.navbar-logo {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    background:
        linear-gradient(135deg, rgba(0, 255, 255, 0.25), rgba(0, 119, 255, 0.30)),
        rgba(0, 212, 255, 0.10);
    color: #8ffbff;
    font-weight: 900;
    text-transform: uppercase;
    box-shadow: 0 0 24px rgba(0, 212, 255, 0.18);
}

.logo-text {
    font-size: 1.05rem;
}

.navbar-toggler {
    border-color: rgba(0, 212, 255, 0.22);
}

.navbar-nav .nav-link {
    position: relative;
    color: #a9b6ca !important;
    margin: 0 0.45rem;
    padding: 0.45rem 0.4rem !important;
    font-size: 0.94rem;
    transition: color 0.22s ease;
    text-decoration: none !important;
}

.navbar-nav .nav-link::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 0;
    height: 2px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    transition: width 0.22s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: #fff !important;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 90%;
}

.btn-outline-light,
.btn-get-started {
    border-radius: 12px;
    padding: 0.55rem 1rem;
    font-weight: 700;
    font-size: 0.86rem;
    text-decoration: none !important;
}

.btn-outline-light {
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.02);
    color: #eaf4ff !important;
}

.btn-outline-light:hover {
    border-color: var(--accent);
    color: var(--accent) !important;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.14);
}

.btn-get-started {
    background: linear-gradient(135deg, #00e5ff, #0098ff);
    color: #030913 !important;
    border: 0;
    box-shadow: 0 12px 30px rgba(0, 212, 255, 0.22);
}

.btn-get-started:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 40px rgba(0, 212, 255, 0.30);
}

/* =========================================================
   Page Layout
========================================================= */

.page-shell {
    min-height: calc(100vh - 82px);
    background: transparent !important;
}

.page-shell .container {
    padding-top: 3rem;
    padding-bottom: 4rem;
}

.page-card {
    width: min(100%, 920px);
    margin: 0 auto;
}

.glass-panel,
.main-card {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(145deg, rgba(13, 22, 43, 0.96), rgba(4, 10, 24, 0.96));
    border: 1px solid rgba(0, 212, 255, 0.14);
    border-radius: var(--radius-xl);
    padding: clamp(1.5rem, 3vw, 2.65rem);
    box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.04);
    backdrop-filter: blur(24px);
}

.glass-panel::before,
.main-card::before {
    content: "";
    position: absolute;
    inset: 0 12%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.62), transparent);
    opacity: 0.75;
    pointer-events: none;
}

.glass-panel::after,
.main-card::after {
    content: "";
    position: absolute;
    right: -120px;
    top: -120px;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.12), transparent 68%);
    pointer-events: none;
}

.page-card h1,
.gradient-title,
.pdf-summary-title,
.event-promo-title,
h1.page-title {
    font-size: clamp(2rem, 4vw, 3.3rem);
    line-height: 1.1;
    font-weight: 850;
    letter-spacing: -0.035em;
    background: linear-gradient(135deg, #ffffff 35%, #aeefff 68%, #00d4ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    margin-bottom: 0.65rem;
}

.page-card p,
.subtitle,
.pdf-summary-subtitle {
    color: var(--muted);
    line-height: 1.75;
}

.helper-text {
    color: var(--muted-2);
    font-size: 0.95rem;
    text-align: center;
    padding: 1rem 0 0;
    margin-bottom: 0 !important;
}

/* =========================================================
   Home / Feature Hub
========================================================= */

.hero-section {
    position: relative;
    text-align: center;
    padding: 4.5rem 0 3rem;
}

.hero-section::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -60px;
    width: min(900px, 90vw);
    height: 420px;
    transform: translateX(-50%);
    background: radial-gradient(ellipse at center, rgba(0, 212, 255, 0.14), transparent 68%);
    pointer-events: none;
}

.glow-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 212, 255, 0.10);
    border: 1px solid rgba(0, 212, 255, 0.28);
    border-radius: 999px;
    padding: 0.5rem 1rem;
    color: #75efff;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    box-shadow: 0 0 28px rgba(0, 212, 255, 0.12);
}

.hero-title {
    display: block;
    font-size: clamp(3rem, 8vw, 5.8rem);
    font-weight: 900;
    line-height: 0.98;
    margin: 1rem auto 1rem;
    letter-spacing: -0.055em;
    background: linear-gradient(135deg, #fff 30%, #b7f6ff 62%, #00d4ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    max-width: 720px;
    margin: 0 auto 2.75rem;
    color: #8da0b9;
    font-size: 1.05rem;
    line-height: 1.85;
}

.feature-card-link {
    text-decoration: none !important;
    color: inherit;
    display: block;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.25rem;
    max-width: 1420px;
    margin: 0 auto;
    padding: 0 1rem 4rem;
}

.feature-card {
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 1.65rem;
    border-radius: 24px;
    background:
        linear-gradient(145deg, rgba(13, 25, 48, 0.95), rgba(5, 11, 25, 0.95));
    border: 1px solid rgba(0, 212, 255, 0.13);
    box-shadow: 0 18px 42px rgba(0,0,0,0.28);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.feature-card::before {
    content: "";
    position: absolute;
    inset: 0 12%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.feature-card::after {
    content: "";
    position: absolute;
    right: -70px;
    top: -70px;
    width: 170px;
    height: 170px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.12), transparent 70%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.feature-card:hover {
    transform: translateY(-9px);
    border-color: rgba(0, 212, 255, 0.42);
    box-shadow: 0 24px 60px rgba(0,0,0,0.42), 0 0 34px rgba(0,212,255,0.12);
}

.feature-card:hover::before,
.feature-card:hover::after {
    opacity: 1;
}

.icon-circle,
.icon-wrap {
    width: 56px;
    height: 56px;
    min-width: 56px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 212, 255, 0.10);
    border: 1px solid rgba(0, 212, 255, 0.24);
    color: var(--accent);
    box-shadow: 0 0 22px rgba(0, 212, 255, 0.12);
}

.icon-circle {
    margin-bottom: 1.1rem;
}

.icon-circle i,
.icon-wrap i {
    font-size: 1.35rem;
    color: var(--accent);
}

.card-title {
    font-size: 1.02rem;
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 0.65rem;
    color: #eaf7ff;
    background: linear-gradient(135deg, #00d4ff, #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card-description {
    color: #8392aa !important;
    font-size: 0.86rem;
    line-height: 1.75;
    flex: 1;
    margin-bottom: 1.25rem;
}

.card-button {
    width: 100%;
    border: 1px solid rgba(0, 212, 255, 0.30);
    background: rgba(0, 212, 255, 0.045);
    color: var(--accent);
    border-radius: 12px;
    padding: 0.72rem 1rem;
    font-weight: 800;
    font-size: 0.82rem;
    text-decoration: none !important;
}

.card-button:hover {
    background: rgba(0, 212, 255, 0.10);
    border-color: rgba(0, 212, 255, 0.56);
}

.card-button .arrow {
    display: inline-block;
    transition: transform 0.22s ease;
}

.card-button:hover .arrow {
    transform: translateX(4px);
}

/* =========================================================
   Forms
========================================================= */

.form-label {
    color: #b8c8dc;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.10em;
    margin-bottom: 0.55rem;
}

.form-control,
.form-select,
select.form-control {
    width: 100%;
    background: rgba(6, 12, 26, 0.94) !important;
    border: 1px solid rgba(0, 212, 255, 0.16) !important;
    border-radius: 13px !important;
    color: #f3f9ff !important;
    font-size: 0.92rem;
    padding: 0.78rem 1rem;
    outline: none !important;
    box-shadow: none !important;
}

.form-control:focus,
.form-select:focus,
select.form-control:focus {
    border-color: rgba(0, 212, 255, 0.56) !important;
    box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.10) !important;
    background: rgba(4, 9, 21, 0.98) !important;
}

.form-control::placeholder {
    color: #475569;
}

textarea.form-control {
    min-height: 145px;
    resize: vertical;
    line-height: 1.65;
}

.form-text,
.text-muted {
    color: #607089 !important;
}

input[type="file"] {
    width: 100%;
    padding: 0.72rem 1rem;
    background: rgba(7, 14, 30, 0.94);
    border: 1px solid rgba(0, 212, 255, 0.19);
    border-radius: 13px;
    color: #9eafc6;
    font-size: 0.9rem;
    cursor: pointer;
}

input[type="file"]::file-selector-button {
    background: rgba(0, 212, 255, 0.14);
    border: 1px solid rgba(0, 212, 255, 0.34);
    border-radius: 9px;
    color: #8df5ff;
    font-weight: 800;
    padding: 0.48rem 0.95rem;
    margin-right: 0.9rem;
    cursor: pointer;
}

input[type="file"]::file-selector-button:hover {
    background: rgba(0, 212, 255, 0.23);
}

/* =========================================================
   Buttons
========================================================= */

.btn {
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.btn-primary,
.btn-neon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 54px;
    border: 0 !important;
    border-radius: 15px;
    color: #03101a !important;
    background: linear-gradient(135deg, var(--accent-2), var(--accent));
    box-shadow: 0 16px 34px rgba(0, 212, 255, 0.22), inset 0 1px 0 rgba(255,255,255,0.22);
    font-size: 0.92rem;
    font-weight: 900;
    letter-spacing: 0.025em;
}

.btn-neon {
    width: 100%;
}

.btn-primary:hover,
.btn-neon:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #20f2c4, #00b8ff);
    box-shadow: 0 22px 48px rgba(0, 212, 255, 0.32);
}

.btn-primary:disabled,
.btn-neon:disabled,
button:disabled {
    opacity: 0.72;
    cursor: wait !important;
    transform: none !important;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 0.78rem 1rem;
    background: rgba(0, 212, 255, 0.06);
    border: 1px solid rgba(0, 212, 255, 0.34);
    border-radius: 13px;
    color: var(--accent) !important;
    font-weight: 800;
    text-decoration: none !important;
}

.btn-download:hover {
    background: rgba(0, 212, 255, 0.12);
    box-shadow: 0 0 22px rgba(0, 212, 255, 0.16);
}

/* =========================================================
   Upload Cards / Zones
========================================================= */

.upload-card,
.upload-zone {
    position: relative;
    overflow: hidden;
    background: rgba(0, 212, 255, 0.045);
    border: 1.5px dashed rgba(0, 212, 255, 0.30);
    border-radius: 20px;
    margin-bottom: 1.3rem;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.upload-card:hover,
.upload-zone:hover {
    background: rgba(0, 212, 255, 0.075);
    border-color: rgba(0, 212, 255, 0.54);
}

.upload-card {
    display: block !important;
}

.upload-card .upload-top-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.45rem 1.45rem 1rem;
}

.upload-card .upload-icon {
    width: 54px;
    height: 54px;
    min-width: 54px;
    border-radius: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    background: rgba(0, 212, 255, 0.12);
    border: 1px solid rgba(0, 212, 255, 0.24);
}

.upload-card .upload-body p {
    margin: 0;
    color: #f4f9ff !important;
    font-weight: 800;
}

.upload-card .upload-body small {
    color: var(--muted-2);
}

.upload-card input[type="file"] {
    border: 0 !important;
    border-top: 1px solid rgba(0, 212, 255, 0.13) !important;
    border-radius: 0 0 18px 18px !important;
    background: rgba(0, 0, 0, 0.22) !important;
    margin-bottom: 0;
}

/* =========================================================
   Progress / Processing UI
========================================================= */

.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none !important;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background: rgba(2, 6, 15, 0.78);
    backdrop-filter: blur(10px);
}

.loading-overlay.active,
.loading-overlay[style*="flex"] {
    display: flex !important;
}

.loading-spinner {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.10);
    border-top-color: var(--accent);
    border-right-color: var(--accent-2);
    animation: spin 0.88s linear infinite;
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.28);
}

.loading-text {
    margin-top: 1.25rem;
    color: #e8faff;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.loading-text::after {
    content: "";
    display: block;
    width: 260px;
    height: 8px;
    margin: 1rem auto 0;
    border-radius: 999px;
    background:
        linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.95), transparent),
        rgba(255,255,255,0.08);
    background-size: 60% 100%, 100% 100%;
    background-repeat: no-repeat;
    animation: progressSweep 1.25s ease-in-out infinite;
}

.inline-progress,
.progress-track {
    height: 9px;
    width: 100%;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(0, 212, 255, 0.12);
}

.inline-progress::before,
.progress-track .progress-bar,
.progress-track::before {
    content: "";
    display: block;
    height: 100%;
    width: 42%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent-2), var(--accent), var(--accent-3));
    box-shadow: 0 0 18px rgba(0, 212, 255, 0.28);
    animation: progressMove 1.15s ease-in-out infinite;
}

.btn-loading-spinner {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(3, 13, 20, 0.28);
    border-top-color: #03101a;
    animation: spin 0.8s linear infinite;
}

.processing-card {
    border-radius: 18px;
    border: 1px solid rgba(0, 212, 255, 0.16);
    background: rgba(0, 212, 255, 0.055);
    padding: 1.1rem;
    color: #cdeeff;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes progressMove {
    0% { transform: translateX(-120%); }
    50% { transform: translateX(70%); }
    100% { transform: translateX(250%); }
}

@keyframes progressSweep {
    0% { background-position: -180px 0, 0 0; }
    100% { background-position: 260px 0, 0 0; }
}

/* =========================================================
   Result Panels / Alerts
========================================================= */

.result-panel {
    margin-top: 2.4rem;
}

.result-panel h2,
.result-title,
.results-heading,
.analysis-results-header {
    font-size: 1.45rem;
    font-weight: 850;
    color: var(--accent);
    text-align: center;
    margin-bottom: 1.4rem;
}

.result-panel h2::after,
.result-title::after,
.results-heading::after {
    content: "";
    display: block;
    width: 56px;
    height: 2px;
    margin: 0.55rem auto 0;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.alert {
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 16px;
    padding: 1rem 1.15rem;
}

.alert-danger {
    color: #ffd7df;
    background: rgba(255, 77, 109, 0.10);
    border-color: rgba(255, 77, 109, 0.22);
}

.alert-warning {
    color: #fff0c8;
    background: rgba(255, 191, 71, 0.12);
    border-color: rgba(255, 191, 71, 0.24);
}

.alert-success {
    color: #d7ffe9;
    background: rgba(61, 255, 157, 0.10);
    border-color: rgba(61, 255, 157, 0.24);
}

/* =========================================================
   Image Cards / Gallery / Fallbacks
========================================================= */

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
    gap: 1.25rem;
}

.image-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: linear-gradient(145deg, rgba(12, 24, 46, 0.94), rgba(5, 12, 26, 0.94));
    border: 1px solid rgba(0, 212, 255, 0.12);
    box-shadow: 0 16px 34px rgba(0,0,0,0.28);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.image-card:hover {
    transform: translateY(-7px);
    border-color: rgba(0, 212, 255, 0.40);
    box-shadow: 0 22px 48px rgba(0,0,0,0.40), 0 0 26px rgba(0,212,255,0.10);
}

.image-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.image-card:hover img {
    transform: scale(1.045);
}

.image-card .card-body {
    padding: 0.95rem 1rem;
    background: rgba(0,0,0,0.22);
    border-top: 1px solid rgba(0, 212, 255, 0.09);
}

.image-card h5 {
    color: #d0eff7;
    font-size: 0.86rem;
    font-weight: 800;
    text-align: center;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.image-fallback {
    background:
        radial-gradient(circle at center, rgba(0, 212, 255, 0.10), transparent 60%),
        #020814 !important;
    color: #e8faff;
    font-weight: 800;
    text-align: center;
    min-height: 220px;
}

/* =========================================================
   Event Promo
========================================================= */

.result-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.65rem;
    align-items: start;
}

.result-image-wrap,
.result-panel img.rounded,
.result-panel .img-fluid.rounded {
    overflow: hidden;
    border-radius: 20px !important;
    border: 1px solid rgba(0, 212, 255, 0.16);
    box-shadow: 0 18px 48px rgba(0,0,0,0.42);
}

.result-details {
    background: rgba(0, 212, 255, 0.045);
    border: 1px solid rgba(0, 212, 255, 0.14);
    border-radius: 18px;
    padding: 1.35rem;
}

.result-detail-row {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.result-detail-row:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
}

.result-detail-label {
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.13em;
}

.result-detail-value {
    color: #cbd5e1;
    line-height: 1.7;
}

/* =========================================================
   PDF Summary / PDF Chat
========================================================= */

.pdf-summary-page {
    max-width: 1100px;
    margin: 0 auto;
}

.results-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 1.6rem;
}

.file-info-card,
.summary-section,
.extracted-text-section,
.chat-container,
.analysis-results {
    background: rgba(0, 212, 255, 0.038);
    border: 1px solid rgba(0, 212, 255, 0.13);
    border-radius: 20px;
    padding: 1.25rem;
}

.info-item,
.stat-item {
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255,255,255,0.055);
    border-radius: 14px;
    padding: 0.95rem;
    margin-bottom: 0.75rem;
}

.info-label,
.stat-label {
    display: block;
    color: var(--muted-2);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.info-value,
.stat-value {
    display: block;
    margin-top: 0.35rem;
    color: #f3fbff;
    font-weight: 800;
    word-break: break-word;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.95rem;
    margin-bottom: 1.5rem;
}

.summary-box {
    background: rgba(0, 212, 255, 0.05);
    border-left: 3px solid var(--accent);
    border-radius: 0 16px 16px 0;
    padding: 1.2rem 1.35rem;
    color: #cbd5e1;
    line-height: 1.75;
}

.key-points-title {
    color: #f3fbff;
    font-size: 1rem;
    font-weight: 900;
    margin: 1.3rem 0 0.85rem;
}

.key-points-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.key-points-list li,
.key-point-item {
    position: relative;
    padding: 0.65rem 0 0.65rem 1.45rem;
    border-bottom: 1px solid rgba(255,255,255,0.055);
    color: #b5c4d8;
    line-height: 1.65;
}

.key-points-list li::before,
.key-point-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1.12rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.55);
}

.extracted-preview,
.extracted-text-preview {
    background: #030915;
    border: 1px solid rgba(0, 212, 255, 0.16);
    border-radius: 16px;
    overflow: hidden;
}

.extracted-preview-header,
.extracted-text-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.78rem 1rem;
    background: rgba(0, 212, 255, 0.06);
    border-bottom: 1px solid rgba(0, 212, 255, 0.12);
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.extracted-preview pre,
.extracted-preview-body,
.extracted-text-preview pre {
    max-height: 320px;
    overflow-y: auto;
    margin: 0;
    padding: 1.1rem;
    color: #8beeff;
    font-family: "JetBrains Mono", "Consolas", monospace;
    font-size: 0.78rem;
    line-height: 1.75;
    white-space: pre-wrap;
}

.copy-btn {
    border: 1px solid rgba(0, 212, 255, 0.22);
    background: rgba(0, 212, 255, 0.08);
    color: var(--accent);
    border-radius: 8px;
    padding: 0.32rem 0.55rem;
}

.chat-container {
    padding: 0;
    overflow: hidden;
}

.chat-history {
    height: 360px;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chat-placeholder {
    color: var(--muted-2);
    text-align: center;
    margin: auto;
}

.chat-bubble {
    max-width: 82%;
}

.user-bubble {
    align-self: flex-end;
    text-align: right;
}

.ai-bubble {
    align-self: flex-start;
}

.bubble-label {
    color: var(--muted-2);
    font-size: 0.72rem;
    margin: 0 0.35rem;
}

.bubble-body {
    padding: 0.72rem 0.95rem;
    border-radius: 18px;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.62;
}

.user-bubble .bubble-body {
    background: linear-gradient(135deg, var(--accent), #0080ff);
    color: #02101c;
    font-weight: 700;
    border-bottom-right-radius: 6px;
}

.ai-bubble .bubble-body {
    background: rgba(255,255,255,0.07);
    color: #dbeafe;
    border: 1px solid rgba(255,255,255,0.07);
    border-bottom-left-radius: 6px;
}

.chat-input {
    display: flex;
    gap: 0.75rem;
    padding: 0.9rem;
    border-top: 1px solid rgba(0, 212, 255, 0.12);
}

.chat-input .form-control {
    flex: 1;
}

#chat-processing {
    color: var(--accent);
}

/* =========================================================
   Translator
========================================================= */

pre.bg-dark {
    background: rgba(2, 8, 20, 0.95) !important;
    border: 1px solid rgba(0, 212, 255, 0.12);
    border-radius: 14px !important;
    color: #d9f7ff;
    white-space: pre-wrap;
    line-height: 1.7;
}

.result-panel .btn-primary,
.result-panel .btn-neon {
    width: auto;
    min-width: 220px;
}

/* =========================================================
   Modal
========================================================= */

.modal__overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(2, 6, 15, 0.84);
    backdrop-filter: blur(12px);
}

.modal__container {
    width: min(95vw, 760px);
    max-height: 88vh;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(8, 15, 31, 0.98), rgba(3, 8, 18, 0.99));
    border: 1px solid rgba(0, 212, 255, 0.18);
    border-radius: 26px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.52);
    padding: 1.5rem;
    color: var(--text);
}

.modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal__title {
    margin: 0;
    color: var(--accent);
    font-weight: 900;
}

.modal__close {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    width: 38px;
    height: 38px;
    border-radius: 12px;
    color: var(--text);
    font-size: 1.4rem;
    cursor: pointer;
}

.modal__content {
    margin-top: 1rem;
    max-height: 68vh;
    overflow-y: auto;
}

.modal__content img {
    border-radius: 18px;
}

.modal__footer {
    margin-top: 1rem;
    text-align: right;
}

/* =========================================================
   Scrollbars
========================================================= */

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 212, 255, 0.55) rgba(255,255,255,0.04);
}

*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.04);
}

*::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.45);
    border-radius: 999px;
}

/* =========================================================
   Footer Upload
========================================================= */

.upload-footer {
    position: fixed;
    left: 50%;
    bottom: 1.25rem;
    transform: translateX(-50%);
    z-index: 1000;
    padding: 0.75rem;
    border: 1px solid rgba(0, 212, 255, 0.14);
    border-radius: 18px;
    background: rgba(5, 10, 22, 0.82);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 46px rgba(0,0,0,0.38);
}

.btn-upload {
    background: linear-gradient(135deg, var(--accent-2), var(--accent));
    border: 0;
    border-radius: 12px;
    color: #03101a;
    font-weight: 900;
    padding: 0.75rem 1.4rem;
}

/* =========================================================
   Responsive
========================================================= */

@media (max-width: 1200px) {
    .feature-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .results-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .page-shell .container {
        padding-top: 1.5rem;
        padding-bottom: 2.5rem;
    }

    .navbar-nav {
        padding-top: 1rem;
    }

    .navbar-nav .btn {
        width: 100%;
        margin: 0.35rem 0 0 !important;
    }

    .hero-section {
        padding: 3rem 0 2rem;
    }

    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
        padding-bottom: 3rem;
    }

    .glass-panel,
    .main-card {
        border-radius: 22px;
        padding: 1.45rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .result-layout {
        grid-template-columns: 1fr;
    }

    .chat-input {
        flex-direction: column;
    }

    .chat-bubble {
        max-width: 94%;
    }
}

@media (max-width: 520px) {
    .feature-grid,
    .image-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 3rem;
    }

    .page-card h1,
    .gradient-title {
        font-size: 2.05rem;
    }

    .upload-card .upload-top-row {
        align-items: flex-start;
    }
}