/* ============================================================
   DogovorAI — Design System & Styles
   Тёмная тема, glassmorphism, плавные анимации
   ============================================================ */

/* ===== CSS VARIABLES ===== */
:root {
    --bg-primary: #080b14;
    --bg-secondary: #0d1424;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.07);
    --bg-glass: rgba(13, 20, 36, 0.8);

    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-cyan: #06b6d4;
    --accent-gradient: linear-gradient(135deg, #3b82f6, #8b5cf6);

    --risk-high: #ef4444;
    --risk-high-bg: rgba(239, 68, 68, 0.1);
    --risk-medium: #f59e0b;
    --risk-medium-bg: rgba(245, 158, 11, 0.1);
    --risk-low: #10b981;
    --risk-low-bg: rgba(16, 185, 129, 0.1);

    --text-primary: #f0f4ff;
    --text-secondary: #8892a4;
    --text-muted: #4a5568;

    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(59, 130, 246, 0.4);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.15);

    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Inter', -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== HEADER ===== */
.header {
    position: fixed;
    top: 12px;
    left: 20px;
    right: 20px;
    margin: 0 auto;
    max-width: 1100px;
    z-index: 1000;
    padding: 12px 24px;
    background: rgba(13, 20, 36, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    transition: all var(--transition);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
}

@media (max-width: 768px) {
    .header {
        top: 8px;
        left: 12px;
        right: 12px;
        padding: 10px 16px;
        border-radius: 24px;
    }
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo-icon { font-size: 24px; }
.logo-accent { background: var(--accent-gradient); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.nav { display: flex; gap: 32px; align-items: center; }
.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color var(--transition);
}
.nav-link:hover { color: var(--text-primary); }

.nav-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    color: #ffffff;
    background: #111827;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background 0.2s ease, transform 0.2s ease;
}

.nav-button:hover {
    background: #0f172a;
    transform: translateY(-1px);
}

.nav-button-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(17, 24, 39, 0.12);
}

.nav-button-secondary:hover {
    background: rgba(17, 24, 39, 0.05);
}

.hero-actions {
    margin-top: 36px;
    display: flex;
    justify-content: center;
}

.hero-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 28px;
    border-radius: 999px;
    background: #111827;
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: -0.02em;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-button:hover {
    background: #0f172a;
    transform: translateY(-1px);
}

.hero-button-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.24);
    margin-right: 14px;
}

.hero-button-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* ===== HERO ===== */
.hero {
    position: relative;
    padding: 160px 0 100px;
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
}

.hero-orb-1 {
    width: 600px; height: 600px;
    background: radial-gradient(circle, #3b82f6, transparent);
    top: -200px; left: -200px;
    animation: float 8s ease-in-out infinite;
}

.hero-orb-2 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, #8b5cf6, transparent);
    bottom: -150px; right: -150px;
    animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-30px) scale(1.05); }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: var(--accent-blue);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 32px;
    letter-spacing: 0.3px;
}

.badge-dot {
    width: 6px; height: 6px;
    background: var(--accent-blue);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.5); }
}

.hero-title {
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1.1;
    margin-bottom: 24px;
}

.gradient-text {
    background: var(--accent-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto 48px;
    line-height: 1.7;
}

.hero-stats {
    display: inline-flex;
    align-items: center;
    gap: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 16px 32px;
    border-radius: var(--radius-xl);
    backdrop-filter: blur(10px);
}

.stat { text-align: center; }
.stat-value { display: block; font-size: 18px; font-weight: 700; color: var(--accent-blue); }
.stat-label { display: block; font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-top: 2px; }
.stat-divider { width: 1px; height: 36px; background: var(--border); }

/* ===== FEATURES ===== */
.features { padding: 80px 0; }
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: all var(--transition);
    cursor: default;
}

.feature-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(59, 130, 246, 0.25);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.feature-icon {
    font-size: 36px;
    margin-bottom: 16px;
    display: block;
}

.feature-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== UPLOAD SECTION ===== */
.upload-section { padding: 60px 0 80px; }

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 12px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 16px;
}

.upload-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px;
    max-width: 640px;
    margin: 0 auto;
    backdrop-filter: blur(10px);
}

/* Drop Zone */
.drop-zone {
    border: 2px dashed rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.05);
}

.drop-zone.dragover { transform: scale(1.01); }

.drop-zone-icon {
    color: var(--accent-blue);
    opacity: 0.6;
    margin-bottom: 16px;
    transition: all var(--transition);
}

.drop-zone:hover .drop-zone-icon { opacity: 1; transform: translateY(-4px); }

.drop-zone-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
}

.drop-zone-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.drop-zone-formats {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.format-badge {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: var(--accent-blue);
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.drop-zone-limit {
    font-size: 12px;
    color: var(--text-muted);
}

.file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

/* File Preview */
.file-preview {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 0;
    animation: slideIn 0.3s ease;
}

.file-preview-icon { font-size: 32px; }

.file-preview-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.file-preview-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

.file-preview-size { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }

.file-remove-btn {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--risk-high);
    width: 32px; height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    flex-shrink: 0;
}

.file-remove-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: scale(1.1);
}

/* Analyze Button */
.analyze-btn {
    width: 100%;
    padding: 16px 32px;
    background: var(--accent-gradient);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-family: var(--font);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 24px;
    letter-spacing: 0.3px;
}

.analyze-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.4);
}

.analyze-btn:active:not(:disabled) { transform: translateY(0); }

.analyze-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    background: linear-gradient(135deg, #4a5568, #6b7280);
}

.btn-icon { font-size: 18px; }

/* ===== PROGRESS ===== */
.progress-container {
    max-width: 640px;
    margin: 32px auto 0;
    animation: slideIn 0.4s ease;
}

.progress-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 16px;
}

.progress-spinner {
    width: 40px; height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    flex-shrink: 0;
}

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

.progress-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.progress-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

.progress-steps {
    display: flex;
    gap: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 28px;
}

.progress-step {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-muted);
    transition: color var(--transition);
}

.progress-step.active { color: var(--text-primary); }
.progress-step.done { color: var(--risk-low); }

.step-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--text-muted);
    flex-shrink: 0;
    transition: all var(--transition);
}

.progress-step.active .step-dot {
    background: var(--accent-blue);
    box-shadow: 0 0 8px var(--accent-blue);
    animation: pulse 1s infinite;
}

.progress-step.done .step-dot {
    background: var(--risk-low);
}

/* ===== RESULTS ===== */
.results-section { padding: 60px 0 100px; animation: slideIn 0.5s ease; }

.results-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 16px;
}

.results-title-block h2 {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 6px;
}

.results-filename {
    font-size: 14px;
    color: var(--text-secondary);
}

.results-verdict {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 15px;
    border: 1px solid;
}

.results-verdict.verdict-high {
    background: var(--risk-high-bg);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--risk-high);
}

.results-verdict.verdict-medium {
    background: var(--risk-medium-bg);
    border-color: rgba(245, 158, 11, 0.3);
    color: var(--risk-medium);
}

.results-verdict.verdict-low {
    background: var(--risk-low-bg);
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--risk-low);
}

/* Summary */
.summary-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin-bottom: 20px;
}

.summary-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.summary-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    font-weight: 600;
}

.doc-type-badge {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.25);
    color: var(--accent-purple);
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
}

.summary-text {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Result Stats */
.results-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 28px;
}

.result-stat {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    transition: all var(--transition);
}

.result-stat:hover { transform: translateY(-2px); }

.result-stat-high { border-top: 3px solid var(--risk-high); }
.result-stat-medium { border-top: 3px solid var(--risk-medium); }
.result-stat-low { border-top: 3px solid var(--risk-low); }

.result-stat-value {
    display: block;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -1px;
}

.result-stat-high .result-stat-value { color: var(--risk-high); }
.result-stat-medium .result-stat-value { color: var(--risk-medium); }
.result-stat-low .result-stat-value { color: var(--risk-low); }

.result-stat-label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Risk Cards */
.risks-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 28px;
}

.risk-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    transition: all var(--transition);
    animation: slideIn 0.3s ease;
    border-left: 4px solid transparent;
}

.risk-card:hover {
    background: var(--bg-card-hover);
    transform: translateX(4px);
}

.risk-card.risk-high { border-left-color: var(--risk-high); }
.risk-card.risk-medium { border-left-color: var(--risk-medium); }
.risk-card.risk-low { border-left-color: var(--risk-low); }

.risk-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.risk-level-badge {
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.badge-high { background: var(--risk-high-bg); color: var(--risk-high); border: 1px solid rgba(239,68,68,0.25); }
.badge-medium { background: var(--risk-medium-bg); color: var(--risk-medium); border: 1px solid rgba(245,158,11,0.25); }
.badge-low { background: var(--risk-low-bg); color: var(--risk-low); border: 1px solid rgba(16,185,129,0.25); }

.risk-category {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.risk-description {
    font-size: 15px;
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 12px;
}

.risk-original-clause {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 13px;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 12px;
    position: relative;
}

.risk-original-clause::before {
    content: "Исходный текст";
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-style: normal;
}

.risk-footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.risk-recommendation {
    font-size: 14px;
    color: var(--accent-blue);
    padding: 8px 12px;
    background: rgba(59, 130, 246, 0.06);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--accent-blue);
}

.risk-recommendation::before { content: "💡 "; }

.risk-law {
    font-size: 13px;
    color: var(--accent-purple);
    padding: 6px 12px;
    background: rgba(139, 92, 246, 0.06);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--accent-purple);
    cursor: pointer;
    transition: all var(--transition);
}

.risk-law:hover { background: rgba(139, 92, 246, 0.12); }
.risk-law-ref { font-weight: 600; }

/* Recommendations */
.recommendations-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 32px;
}

.rec-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
}

.rec-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rec-list li {
    font-size: 14px;
    color: var(--text-secondary);
    padding-left: 20px;
    position: relative;
    line-height: 1.6;
}

.rec-list li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--accent-blue);
    font-weight: 700;
}

/* New Analysis */
.new-analysis-block { text-align: center; }

.new-analysis-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 12px 32px;
    border-radius: var(--radius-md);
    font-family: var(--font);
    font-size: 15px;
    cursor: pointer;
    transition: all var(--transition);
}

.new-analysis-btn:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.05);
}

/* ===== TOAST ===== */
.error-toast {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background: rgba(30, 10, 10, 0.95);
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 400px;
    backdrop-filter: blur(20px);
    z-index: 1000;
    animation: slideInRight 0.4s ease;
    box-shadow: var(--shadow-lg);
}

.toast-icon { font-size: 20px; }
.toast-message { flex: 1; font-size: 14px; color: #fca5a5; }
.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    padding: 0 4px;
    transition: color var(--transition);
}
.toast-close:hover { color: var(--text-primary); }

/* ===== FOOTER ===== */
.footer {
    padding: 32px 0;
    border-top: 1px solid var(--border);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-logo { font-size: 18px; font-weight: 700; }
.footer-text { font-size: 13px; color: var(--text-muted); text-align: center; flex: 1; }
.footer-version { font-size: 12px; color: var(--text-muted); font-family: monospace; }

/* ===== ANIMATIONS ===== */
@keyframes slideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero { padding: 120px 0 60px; }
    .hero-title { font-size: 32px; letter-spacing: -1px; }
    .hero-stats { flex-direction: column; gap: 12px; padding: 20px; }
    .stat-divider { width: 80px; height: 1px; }
    .upload-card { padding: 24px; }
    .results-stats { grid-template-columns: repeat(3, 1fr); }
    .result-stat { padding: 14px; }
    .result-stat-value { font-size: 24px; }
    .results-header { flex-direction: column; }
    .features-grid { grid-template-columns: 1fr 1fr; }
    .footer-inner { flex-direction: column; text-align: center; }
    .nav { display: none; }
}

@media (max-width: 480px) {
    .features-grid { grid-template-columns: 1fr; }
    .results-stats { grid-template-columns: 1fr; }
    .hero-badge { font-size: 12px; }
}

/* ===== USER AVATAR BUTTON & DROPDOWN ===== */
.user-avatar-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(59, 130, 246, 0.4);
    background: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color var(--transition), box-shadow var(--transition);
    position: relative;
}

.user-avatar-btn:hover {
    border-color: rgba(59, 130, 246, 0.8);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.user-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.user-avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: white;
}

/* Dropdown */
.user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 220px;
    background: #0d1424;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    overflow: hidden;
    z-index: 200;
    animation: dropdownIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transform-origin: top right;
}

.user-dropdown.open { display: block; }

@keyframes dropdownIn {
    from { opacity: 0; transform: scale(0.95) translateY(-8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.user-dropdown-header {
    padding: 16px 20px;
    background: rgba(255,255,255,0.03);
}

.dropdown-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-plan {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 3px;
}

.user-dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 4px 0;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.user-dropdown-item:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
}

.user-dropdown-logout {
    color: #f87171;
}

.user-dropdown-logout:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
}
