/* ═══════════════════════════════════════════════
   DesierAI – Dark Glass Design System
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Dark Glass Palette */
    --bg-primary: #0a0f1a;
    --bg-secondary: #0e1525;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-card-hover: rgba(255, 255, 255, 0.09);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --accent: #10b981;
    --accent-hover: #059669;
    --accent-light: rgba(16, 185, 129, 0.12);
    --accent-glow: rgba(16, 185, 129, 0.2);

    --accent-2: #06b6d4;
    /* teal for secondary accents */
    --accent-2-light: rgba(6, 182, 212, 0.12);

    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;

    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 28px;

    --font: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ═══════ RESET ═══════ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-family: var(--font);
    font-size: 16px;
    color: var(--text-primary);
    background: var(--bg-primary);
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(ellipse 800px 500px at 10% 20%, rgba(16, 185, 129, 0.06), transparent),
        radial-gradient(ellipse 600px 600px at 85% 75%, rgba(6, 182, 212, 0.04), transparent),
        radial-gradient(ellipse 400px 300px at 50% 50%, rgba(16, 185, 129, 0.03), transparent),
        var(--bg-primary);
}

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

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

input,
select,
textarea,
button {
    font-family: inherit;
    font-size: inherit;
}

.hidden {
    display: none !important;
}

/* ═══════ ANIMATIONS ═══════ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: .6;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

.animate-in {
    animation: fadeInUp 0.5s cubic-bezier(.22, 1, .36, 1) both;
}

/* ═══════ TYPOGRAPHY ═══════ */
h1 {
    font-size: 2.6rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

h2 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

h3 {
    font-size: 1.2rem;
    font-weight: 600;
}

h4 {
    font-size: 1rem;
    font-weight: 600;
}

.subtitle {
    color: var(--text-secondary);
    margin-top: 4px;
    font-weight: 400;
}

.tagline {
    color: var(--accent);
    font-weight: 600;
    font-size: 1.05rem;
    margin-top: 8px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

/* ═══════ NAV ═══════ */
.glass-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    backdrop-filter: blur(24px) saturate(1.8);
    -webkit-backdrop-filter: blur(24px) saturate(1.8);
    background: rgba(10, 15, 26, 0.75);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 1px 12px rgba(0, 0, 0, 0.2);
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.35rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-icon,
.logo-icon-lg {
    color: var(--accent);
    -webkit-text-fill-color: var(--accent);
    filter: drop-shadow(0 0 8px var(--accent-glow));
}

.logo-icon-lg {
    font-size: 3rem;
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.92rem;
    transition: all 0.25s;
    position: relative;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
}

.nav-links a:hover {
    color: var(--accent);
    background: var(--accent-light);
}

.nav-links a.active {
    color: var(--accent);
    background: var(--accent-light);
    font-weight: 600;
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--accent);
    border-radius: 3px;
}

/* ═══════ BUTTONS ═══════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    border: none;
    transition: all 0.25s cubic-bezier(.22, 1, .36, 1);
    letter-spacing: 0.01em;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #059669);
    color: white;
    box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-primary:hover {
    box-shadow: 0 6px 24px rgba(16, 185, 129, 0.35);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px var(--accent-glow);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1.5px solid rgba(16, 185, 129, 0.2);
}

.btn-ghost:hover {
    background: var(--accent-light);
    color: var(--accent);
    border-color: var(--accent);
}

.btn-full {
    width: 100%;
}

.btn-sm {
    padding: 7px 16px;
    font-size: 0.82rem;
}

.btn-loader {
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* ═══════ GLASS CARD ═══════ */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    box-shadow: var(--glass-shadow);
    padding: 28px;
    transition: all 0.35s cubic-bezier(.22, 1, .36, 1);
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

/* ═══════ INPUTS ═══════ */
.input-group {
    margin-bottom: 18px;
}

.input-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    outline: none;
    transition: all 0.25s;
    font-size: 0.95rem;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-glow);
    background: rgba(255, 255, 255, 0.08);
}

.input-group input::placeholder,
.input-group textarea::placeholder {
    color: var(--text-muted);
}

.input-group textarea {
    resize: vertical;
}

.input-group select {
    cursor: pointer;
}

.input-group select option {
    background: #1e293b;
    color: #f1f5f9;
}

/* ═══════ AUTH ═══════ */
.page {
    padding-top: 72px;
    min-height: 100vh;
}

#page-auth {
    padding-top: 0;
}

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    gap: 36px;
    background:
        radial-gradient(ellipse 600px 400px at 30% 30%, rgba(16, 185, 129, 0.12), transparent),
        radial-gradient(ellipse 500px 400px at 70% 70%, rgba(6, 182, 212, 0.08), transparent),
        var(--bg-primary);
}

.auth-hero {
    text-align: center;
    position: relative;
    animation: fadeInUp 0.6s ease both;
}

.hero-glow {
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.15), transparent 70%);
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: -1;
    animation: float 6s ease-in-out infinite;
}

.hero-desc {
    color: var(--text-secondary);
    margin-top: 12px;
    line-height: 1.7;
    font-size: 1.05rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    animation: fadeInUp 0.6s ease 0.15s both;
}

.auth-tabs {
    display: flex;
    background: rgba(16, 185, 129, 0.06);
    border-radius: var(--radius-sm);
    padding: 4px;
    margin-bottom: 24px;
}

.tab {
    flex: 1;
    padding: 10px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    border-radius: 7px;
    transition: all 0.25s;
    font-size: 0.92rem;
}

.tab:hover {
    color: var(--accent);
}

.tab.active {
    background: linear-gradient(135deg, var(--accent), #059669);
    color: white;
    box-shadow: 0 2px 10px var(--accent-glow);
}

.auth-error {
    color: var(--error);
    font-size: 0.82rem;
    margin-top: 12px;
    text-align: center;
    padding: 8px;
    background: rgba(239, 68, 68, 0.08);
    border-radius: var(--radius-sm);
}

.auth-success {
    color: var(--success);
    font-size: 0.82rem;
    margin-top: 12px;
    text-align: center;
    padding: 8px;
    background: rgba(16, 185, 129, 0.08);
    border-radius: var(--radius-sm);
}

/* ═══════ DASHBOARD ═══════ */
.page-content {
    max-width: 960px;
    margin: 0 auto;
    padding: 32px 24px 80px;
}

.page-header {
    margin-bottom: 32px;
    animation: fadeInUp 0.5s ease both;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.dash-card {
    text-align: center;
    padding: 32px 24px;
    transition: all 0.35s cubic-bezier(.22, 1, .36, 1);
    animation: fadeInUp 0.5s ease both;
    position: relative;
    overflow: hidden;
}

.dash-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    opacity: 0;
    transition: opacity 0.3s;
}

.dash-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(16, 185, 129, 0.12);
}

.dash-card:hover::before {
    opacity: 1;
}

.dash-card:nth-child(1) {
    animation-delay: 0.1s;
}

.dash-card:nth-child(2) {
    animation-delay: 0.2s;
}

.dash-card:nth-child(3) {
    animation-delay: 0.3s;
}

.dash-card-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.dash-card h3 {
    margin-bottom: 8px;
    color: var(--text-primary);
}

.dash-card p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin-bottom: 16px;
}

.dash-card-actions {
    margin-top: auto;
}

/* ═══════ UPLOAD ═══════ */
.upload-zone {
    text-align: center;
    padding: 60px 24px;
    border: 2.5px dashed rgba(16, 185, 129, 0.25);
    cursor: pointer;
    transition: all 0.35s;
    animation: fadeInUp 0.5s ease both;
}

.upload-zone:hover {
    border-color: var(--accent);
    background: rgba(16, 185, 129, 0.04);
}

.upload-zone.drag-over {
    border-color: var(--accent);
    background: rgba(16, 185, 129, 0.08);
    transform: scale(1.01);
}

.upload-icon {
    font-size: 3.5rem;
    margin-bottom: 16px;
}

.upload-title {
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 1.1rem;
}

.upload-subtitle {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 24px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin: 24px 0 14px;
}

.progress-bar-sm {
    height: 5px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    border-radius: 4px;
    width: 0%;
    transition: width 0.5s cubic-bezier(.22, 1, .36, 1);
}

.upload-status {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: center;
    font-weight: 500;
}

.result-card {
    text-align: center;
    margin-top: 24px;
    animation: fadeInUp 0.5s ease both;
}

.result-icon {
    font-size: 3.5rem;
    margin-bottom: 12px;
}

.result-card h3 {
    margin-bottom: 8px;
}

.result-card p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* ═══════ INTERVIEW ═══════ */
.setup-card {
    max-width: 520px;
    animation: fadeInUp 0.5s ease both;
}

.interview-header {
    margin-bottom: 24px;
    animation: fadeIn 0.4s ease both;
}

.interview-progress {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#question-counter {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.88rem;
    letter-spacing: 0.02em;
}

.question-card {
    max-width: 720px;
    animation: fadeInUp 0.5s ease both;
}

.question-label {
    color: var(--accent);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
    display: inline-block;
    padding: 3px 10px;
    background: var(--accent-light);
    border-radius: 6px;
}

.question-text {
    margin-bottom: 24px;
    line-height: 1.6;
    font-size: 1.05rem;
}

/* Feedback */
.feedback-card {
    max-width: 720px;
    margin-top: 20px;
    animation: fadeInUp 0.4s ease both;
}

.feedback-header {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(16, 185, 129, 0.1);
}

.score-badge {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.score-label {
    font-size: 1.2rem;
    color: var(--text-muted);
    font-weight: 600;
}

.feedback-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 24px;
}

.feedback-item {
    padding: 16px;
    background: rgba(16, 185, 129, 0.04);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--accent);
}

.feedback-item h4 {
    margin-bottom: 8px;
    color: var(--text-primary);
}

.feedback-item p {
    color: var(--text-secondary);
    line-height: 1.65;
    font-size: 0.92rem;
}

.complete-card {
    max-width: 520px;
    margin: 60px auto 0;
    animation: fadeInUp 0.5s ease both;
}

.complete-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 12px;
}

/* ═══════ HISTORY ═══════ */
.section-title {
    font-size: 1.15rem;
    margin-bottom: 16px;
    color: var(--text-primary);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-radius: 2px;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-item {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s cubic-bezier(.22, 1, .36, 1);
    cursor: pointer;
    animation: fadeInUp 0.4s ease both;
}

.history-item:hover {
    border-color: var(--accent);
    background: var(--bg-card-hover);
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.08);
}

.history-item-info h4 {
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.history-item-info p {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.history-item-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.82rem;
    white-space: nowrap;
}

.history-item-stat::after {
    content: '→';
    font-size: 1.1rem;
    transition: transform 0.3s;
}

.history-item:hover .history-item-stat::after {
    transform: translateX(4px);
}

/* History detail page */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 6px 12px;
    border: none;
    background: none;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    margin-bottom: 16px;
}

.back-btn:hover {
    color: var(--accent);
    background: var(--accent-light);
}

.session-header {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(16, 185, 129, 0.1);
}

.session-header .role-tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--accent-light);
    color: var(--accent);
    font-weight: 600;
    font-size: 0.82rem;
    border-radius: 6px;
    margin-top: 8px;
}

.session-header .date-tag {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-top: 6px;
}

.qa-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.qa-pair {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    animation: fadeInUp 0.4s ease both;
}

.qa-question {
    padding: 20px 24px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.06), rgba(6, 182, 212, 0.04));
    border-bottom: 1px solid rgba(16, 185, 129, 0.08);
}

.qa-question .q-label {
    display: inline-block;
    padding: 2px 8px;
    background: var(--accent-light);
    color: var(--accent);
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: 4px;
    margin-bottom: 8px;
}

.qa-question p {
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.55;
    color: var(--text-primary);
}

.qa-answer {
    padding: 20px 24px;
}

.qa-answer .a-label {
    display: inline-block;
    padding: 2px 8px;
    background: var(--accent-2-light);
    color: var(--accent-2);
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: 4px;
    margin-bottom: 8px;
}

.qa-answer p {
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.qa-feedback {
    padding: 16px 24px;
    background: rgba(16, 185, 129, 0.04);
    border-top: 1px solid rgba(16, 185, 129, 0.08);
}

.qa-feedback .f-label {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(245, 158, 11, 0.12);
    color: var(--warning);
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: 4px;
    margin-bottom: 8px;
}

.qa-feedback p {
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--text-muted);
}

.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 0.95rem;
}

/* ═══════ TOAST ═══════ */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 14px 22px;
    color: var(--text-primary);
    font-size: 0.88rem;
    font-weight: 500;
    animation: slideIn 0.3s ease;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
}

.toast.error {
    border-color: var(--error);
    border-left: 3px solid var(--error);
}

.toast.success {
    border-color: var(--success);
    border-left: 3px solid var(--success);
}

.toast.info {
    border-left: 3px solid var(--accent);
}

/* ═══════ LIVE ASSIST ═══════ */
.live-input-section {
    max-width: 700px;
    margin: 0 auto;
}

.live-badges {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.live-badge-green {
    background: var(--accent-light);
    color: var(--accent-hover);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.live-badge-teal {
    background: var(--accent-2-light);
    color: #0891b2;
    border: 1px solid rgba(6, 182, 212, 0.25);
}

.live-badge-amber {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.btn-full {
    width: 100%;
    margin-top: 12px;
}

.btn-loader {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.live-answer-card {
    max-width: 700px;
    margin: 24px auto 0;
    animation: fadeInUp 0.5s ease both;
}

.live-answer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.live-answer-text {
    font-size: 1.08rem;
    line-height: 1.8;
    color: var(--text-primary);
    padding: 20px;
    background: var(--accent-light);
    border-radius: 12px;
    border-left: 4px solid var(--accent);
}

.live-input-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

/* ── Code Block ── */
.live-code-card {
    max-width: 700px;
    margin: 16px auto 0;
    animation: fadeInUp 0.5s ease 0.15s both;
}

.code-block {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    padding: 16px 20px;
    overflow-x: auto;
    font-size: 0.88rem;
    line-height: 1.7;
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'JetBrains Mono', monospace;
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 12px;
    tab-size: 4;
    white-space: pre;
}

.code-block code {
    font-family: inherit;
    color: inherit;
}

.live-extras {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    max-width: 700px;
    margin: 16px auto 0;
}

.live-extra-card {
    animation: fadeInUp 0.5s ease 0.2s both;
}

.live-extra-card h4 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.live-extra-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.live-extra-card ul li {
    padding: 8px 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    border-bottom: 1px solid var(--glass-border);
}

.live-extra-card ul li:last-child {
    border-bottom: none;
}

.live-extra-card ul li::before {
    content: "→ ";
    color: var(--accent);
    font-weight: 700;
}

.live-extra-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    font-style: italic;
}

/* highlight nav for Live Assist */
#nav-live {
    color: var(--accent) !important;
    font-weight: 700 !important;
}

/* ═══════ RESPONSIVE ═══════ */
@media (max-width: 640px) {
    h1 {
        font-size: 1.9rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    .nav-inner {
        padding: 12px 16px;
    }

    .nav-links {
        gap: 4px;
    }

    .nav-links a {
        font-size: 0.82rem;
        padding: 6px 10px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .glass-card {
        padding: 20px;
    }

    .upload-zone {
        padding: 40px 16px;
    }

    .qa-question,
    .qa-answer,
    .qa-feedback {
        padding: 16px 18px;
    }

    .live-extras {
        grid-template-columns: 1fr;
    }
}