* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* �������: ������� ������ �� ���� ������� ������ (�� ������ � mobile @media � ����� .hidden �� ��������� �� desktop) */
.hidden {
    display: none !important;
}

/*
 * ������� ������: ����������� ����� (background-clip / text-fill transparent)
 * � ����� color � �������� ���������� ����� � ����������� �����.
 */
.vb-emoji {
    display: inline-block;
    font-style: normal;
    font-weight: normal;
    line-height: 1;
    vertical-align: -0.12em;
    font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", "EmojiOne Mozilla", sans-serif;
    font-variant-emoji: emoji;
    font-feature-settings: normal;
    -webkit-text-fill-color: unset !important;
    forced-color-adjust: none;
    background: none !important;
    background-image: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    color: inherit;
    filter: none;
}

/* Extra glow on hover for header capsule */
.header-nav:hover { box-shadow: 0 0 52px rgba(37, 99, 235, 0.45), 0 8px 32px rgba(124, 58, 237, 0.18); }

:root {
    /* === LIGHT THEME � vivid blue / indigo / violet (�� ���������-�������) === */
    --primary-color: #2563eb;
    --secondary-color: #1d4ed8;
    --primary-rgb: 37, 99, 235;
    --secondary-rgb: 29, 78, 216;
    --accent-color: #7c3aed;
    --accent-rgb: 124, 58, 237;
    --success-color: #059669;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --danger-color-rgb: 220, 38, 38;
    --dark-color: #0f172a;
    --light-color: #f0f9ff;
    
    /* �����: ������� ��������, ��� �������� ����-������ */
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    
    --border-color: rgba(37, 99, 235, 0.16);
    --border-light: rgba(255, 255, 255, 0.92);
    
    --surface-color: rgba(255, 255, 255, 0.96);
    --surface-hover: #ffffff;
    --surface-elevated: #ffffff;
    
    /* === ROUNDED CORNERS - BIGGER & SOFTER === */
    --border-radius-sm: 12px;
    --border-radius: 18px;
    --border-radius-lg: 24px;
    --border-radius-xl: 32px;
    --border-radius-2xl: 44px;
    --border-radius-full: 9999px;
    
    /* ���� � ���������� ����� ��������� */
    --shadow-xs: 0 1px 3px rgba(37, 99, 235, 0.08);
    --shadow-sm: 0 3px 12px rgba(37, 99, 235, 0.12), 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 8px 24px rgba(37, 99, 235, 0.14), 0 2px 6px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 16px 40px rgba(37, 99, 235, 0.16), 0 4px 12px rgba(15, 23, 42, 0.08);
    --shadow-xl: 0 24px 56px rgba(37, 99, 235, 0.18), 0 8px 20px rgba(15, 23, 42, 0.1);
    --shadow-2xl: 0 32px 72px rgba(37, 99, 235, 0.2), 0 12px 28px rgba(15, 23, 42, 0.12);
    
    /* ������� ����: ��� ����������-������� � saturate(200%) + ������� blur ������ �������� */
    --shadow-clay: 0 14px 44px rgba(37, 99, 235, 0.09), 0 4px 14px rgba(15, 23, 42, 0.05);
    --shadow-clay-hover: 0 20px 52px rgba(37, 99, 235, 0.12), 0 6px 18px rgba(15, 23, 42, 0.07);
    
    --glass-bg: rgba(255, 255, 255, 0.97);
    --glass-border: rgba(255, 255, 255, 0.98);
    /* ������� ���� �������� �� �������� backdrop-blur � ������ ��������� blur �� ��������� */
    --glass-blur: blur(8px) saturate(115%);
    
    /* Transition */
    --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-fast: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-medium: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    --transition-slow: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --animation-speed: 0.4s;
    
    /* Fonts */
    --font-primary: 'Montserrat', sans-serif;
    --font-display: 'Poppins', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --font-handwritten: 'Bad Script', 'Segoe Script', 'Brush Script MT', cursive;

    /* ������ �������� ������� ��� � .faq-preview: �� ��� ���������� ���� .container */
    --vb-main-content-max-width: 100%;

    /* ������� hero: ����, ����� ������� ������� ����� ���� ������� �� ������� */
    --hero-copy-max-width: min(56rem, calc(100vw - 2.5rem));

    --text-heading-lg: clamp(1.125rem, 2.5vw, 1.35rem);
    --text-heading-md: clamp(1.02rem, 2.2vw, 1.15rem);
    --text-body: 0.9375rem;
    --text-caption: 0.8125rem;

    /* === DARK THEME - equally airy === */
    --dark-primary: #60A5FA;
    --dark-secondary: #3B82F6;
    --dark-bg: rgba(8, 12, 24, 0.98);
    --dark-surface: rgba(15, 23, 42, 0.75);
    --dark-surface-elevated: rgba(20, 32, 55, 0.88);
    --dark-text: #e8edf5;
    --dark-text-secondary: #a8b8d8;
    --dark-text-muted: #7888a8;
    --dark-border: rgba(71, 85, 105, 0.3);
    --dark-primary-rgb: 96, 165, 250;
    --dark-glass-bg: rgba(15, 23, 42, 0.72);
    --dark-glass-border: rgba(71, 85, 105, 0.3);
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Performance: GPU-accelerated animation classes */
.anim-fade-in { animation: fadeIn 0.5s ease-out both; will-change: opacity; }
.anim-slide-up { animation: slideUp 0.5s ease-out both; will-change: transform, opacity; }
.anim-scale-in { animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both; will-change: transform, opacity; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: scale(1); } }

@keyframes vbSpinner { to { transform: rotate(360deg); } }
@keyframes vbIconBounce {
    0%, 100% { transform: translateY(0) scale(1); }
    45% { transform: translateY(-7px) scale(1.06); }
}
@keyframes vbPulseSuccess {
    0% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.35); transform: scale(1); }
    70% { box-shadow: 0 0 0 12px rgba(5, 150, 105, 0); transform: scale(1.025); }
    100% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); transform: scale(1); }
}
@keyframes vbErrorShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-3px); }
    40% { transform: translateX(3px); }
    60% { transform: translateX(-2px); }
    80% { transform: translateX(2px); }
}
@keyframes vbResultStagger {
    from { opacity: 0; transform: translateY(-14px); }
    to { opacity: 1; transform: translateY(0); }
}
/* Analysis section entrance animation */
@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(32px); }
    to { opacity: 1; transform: translateY(0); }
}

.analysis:not(.hidden) {
    animation: slideUpFade 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.analysis:not(.hidden) .chart-summary .summary-card {
    animation: slideUpFade 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.analysis:not(.hidden) .chart-summary .summary-card:nth-child(1) { animation-delay: 0.1s; }
.analysis:not(.hidden) .chart-summary .summary-card:nth-child(2) { animation-delay: 0.15s; }
.analysis:not(.hidden) .chart-summary .summary-card:nth-child(3) { animation-delay: 0.2s; }
.analysis:not(.hidden) .chart-summary .summary-card:nth-child(4) { animation-delay: 0.25s; }

.analysis:not(.hidden) .chart-card {
    animation: slideUpFade 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.analysis:not(.hidden) .chart-card:nth-child(1) { animation-delay: 0.2s; }
.analysis:not(.hidden) .chart-card:nth-child(2) { animation-delay: 0.25s; }
.analysis:not(.hidden) .chart-card:nth-child(3) { animation-delay: 0.3s; }

/* Performance: reduce paint areas */
.surface-card { contain: layout style; }

/* Canvas Chart.js ������ containment / ���������� ������ �� iOS/Android ����� ��� ����� 0?0 */
#analysis.surface-card {
    contain: none;
}

.product-insight-section {
    margin-top: 18px;
    padding: 18px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    background: var(--surface-color);
}

.product-insight-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.product-insight-head h3 {
    margin: 0 0 6px;
    color: var(--text-primary);
}

.product-insight-head p,
.product-insight-body {
    color: var(--text-secondary);
}

/* �������: ������� ��������� �� ��� ������; ���� � comparison � ��������� ����� */
.comparison-grid,
.weekly-goals-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
}

@media (max-width: 900px) {
    .weekly-goals-grid,
    .comparison-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

.dashboard-range-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
}

.dashboard-range-toolbar[hidden] {
    display: none !important;
}

.dashboard-range-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.dashboard-range-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

@media (max-width: 640px) {
    .dashboard-range-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        margin-top: 12px;
        padding-top: 10px;
    }

    .dashboard-range-label {
        font-size: 0.8rem;
        font-weight: 700;
    }

    .dashboard-range-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        width: 100%;
    }

    .dashboard-range-buttons .dashboard-range-btn {
        width: 100%;
        min-height: 38px;
        padding: 8px 10px;
        font-size: 0.85rem;
        justify-self: stretch;
    }
}

.progress-dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    margin-top: 18px;
}

.progress-dashboard-grid .chart-card {
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 255, 0.94));
    border: 1px solid rgba(37, 99, 235, 0.26);
    box-shadow:
        0 10px 36px rgba(37, 99, 235, 0.14),
        0 2px 10px rgba(15, 23, 42, 0.06);
}

.dark-theme .progress-dashboard-grid .chart-card {
    background: linear-gradient(165deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.93));
    border-color: rgba(96, 165, 250, 0.42);
    box-shadow:
        0 14px 40px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.progress-dashboard-grid .chart-card::before {
    opacity: 1;
    height: 4px;
}

.progress-dashboard-grid .chart-card-title {
    font-weight: 800;
    letter-spacing: -0.02em;
}

.progress-dashboard-grid .chart-card-desc {
    opacity: 0.92;
}

@media (min-width: 769px) {
    .progress-dashboard-grid .chart-wrap--bar {
        min-height: 280px;
        height: 280px;
    }

    .weekly-goal-card strong {
        font-size: 0.88rem;
        line-height: 1.35;
    }
}

.weekly-goal-card,
.comparison-card,
.profile-payment-row {
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--surface-elevated);
}

.weekly-goal-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 8px;
}

.weekly-goal-card span {
    font-weight: 800;
    font-size: 1.12rem;
    color: var(--text-primary);
}

.weekly-goal-card strong {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.weekly-goal-card--done span {
    color: #059669;
}

.weekly-goal-card--done strong {
    color: #047857;
}

.weekly-goal-card--done {
    border-color: rgba(5, 150, 105, 0.4);
}

body.dark-theme .weekly-goal-card span {
    color: var(--dark-text-primary, #f8fafc);
}

body.dark-theme .weekly-goal-card strong {
    color: var(--dark-text-secondary, #94a3b8);
}

body.dark-theme .weekly-goal-card--done span {
    color: #34d399;
}

body.dark-theme .weekly-goal-card--done strong {
    color: #6ee7b7;
}

.comparison-card,
.profile-payment-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.smart-plan-list {
    padding-left: 20px;
    color: var(--text-primary);
}

.smart-plan-list li + li {
    margin-top: 8px;
}

.profile-history-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.profile-history-head--payments {
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.profile-info.profile-payments-card {
    display: flex;
    flex-direction: column;
}

.profile-payment-history-wrap:not(.hidden) {
    margin-top: 14px;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 10px 30px rgba(15, 23, 42, 0.05);
}

body.dark-theme .profile-payment-history-wrap:not(.hidden) {
    background: rgba(15, 23, 42, 0.94);
    border-color: rgba(51, 65, 85, 0.7);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.profile-payment-history {
    display: block;
    margin-top: 10px;
}

.profile-payment-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.profile-payment-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 15px 16px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.profile-payment-item--invoice {
    border-left: 4px solid var(--primary-color);
}

.profile-payment-item--event {
    border-left: 4px solid var(--accent-color);
}

.profile-payment-item__title {
    font-weight: 750;
    font-size: 0.96rem;
    line-height: 1.35;
    color: var(--text-primary);
}

.profile-payment-item__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.profile-payment-item__sep {
    opacity: 0.5;
    transform: translateY(-0.06em);
}

.profile-entitlements-card,
.profile-payments-card,
.profile-privacy-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.88), rgba(248,250,255,0.96));
}

.profile-entitlements-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
}

@media (max-width: 560px) {
    .profile-entitlements-list {
        grid-template-columns: 1fr;
    }
}

.profile-entitlements-list li {
    padding: 12px 14px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.16);
    color: var(--text-primary);
    font-weight: 650;
}

.profile-payment-row {
    background: #fff;
}

.profile-empty-note {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px dashed rgba(148, 163, 184, 0.32);
    color: var(--text-secondary);
    font-weight: 650;
}

.profile-info > .profile-section-label {
    grid-column: 1 / -1;
    min-height: 0;
    padding: 0;
    background: transparent !important;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.profile-info > .profile-section-label:hover {
    transform: none;
    box-shadow: none;
}

.profile-privacy-card > p:not(.profile-section-label) {
    grid-column: 1 / -1;
    background: rgba(255, 255, 255, 0.76);
}

.profile-privacy-card .profile-actions {
    grid-column: 1 / -1;
}

.profile-privacy-card #profilePrivacyStatus {
    grid-column: 1 / -1;
}

body.dark-theme .profile-entitlements-card,
body.dark-theme .profile-payments-card,
body.dark-theme .profile-privacy-card {
    background: rgba(15, 23, 42, 0.72) !important;
}

body.dark-theme .profile-entitlements-list li,
body.dark-theme .profile-payment-row,
body.dark-theme .profile-empty-note {
    background: #0f172a;
    border-color: #334155;
}

body.dark-theme .profile-payment-item {
    background: #0f172a;
    border-color: #334155;
    box-shadow: none;
}

body.dark-theme .profile-payment-item__title {
    color: var(--dark-text-primary, #f1f5f9);
}

body.dark-theme .profile-payment-item__meta {
    color: var(--dark-text-secondary, #94a3b8);
}

body.dark-theme .profile-info > .profile-section-label {
    background: transparent !important;
    border: 0 !important;
}

.dashboard-empty-state {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px;
    border: 1px dashed var(--border-color);
    border-radius: var(--border-radius);
    background: var(--surface-elevated);
    color: var(--text-secondary);
}

.dashboard-empty-state strong {
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .comparison-grid,
    .weekly-goals-grid {
        grid-template-columns: 1fr;
    }

    .product-insight-head {
        flex-direction: column;
    }

    .chart-wrap--bar,
    .chart-card .chart-wrap--bar {
        min-height: 160px !important;
        height: 160px !important;
    }

    .chart-wrap--radar,
    .chart-card--main .chart-wrap {
        min-height: 260px !important;
        height: 260px !important;
    }

    .profile-info:first-of-type {
        grid-template-columns: 1fr;
    }
}

/* === AIRY SURFACE CARDS === */
.surface-card {
    border-radius: var(--border-radius-xl);
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 255, 0.96) 100%);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.98);
    border-top: 1px solid rgba(255, 255, 255, 1);
    box-shadow: var(--shadow-md);
    padding: 32px;
    margin-bottom: 24px;
    transition: var(--transition-slow);
    position: relative;
    overflow: hidden;
}

.surface-card::before {
    content: '';
    display: none;
}

.surface-card:hover {
    transform: translateY(-4px) scale(1.005);
    box-shadow: var(--shadow-lg);
    background: #ffffff;
    border-color: rgba(37, 99, 235, 0.2);
}

.surface-card:hover::before {
    display: none;
}

.surface-card--accent {
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.95) 0%, rgba(245, 243, 255, 0.88) 100%);
    border-left: 4px solid;
    border-image: linear-gradient(180deg, var(--primary-color), var(--accent-color)) 1;
    border-top: none;
    border-right: none;
    border-bottom: none;
}

.surface-card--elevated {
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-lg);
}

.dark-theme .surface-card {
    background: rgba(20, 32, 55, 0.72);
    border-color: rgba(71, 85, 105, 0.25);
    border-top-color: rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.04);
}

.dark-theme .surface-card:hover {
    background: rgba(25, 40, 65, 0.82);
    border-color: rgba(96, 165, 250, 0.2);
    box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.06);
}

.dark-theme .surface-card::before {
    display: none;
}

.dark-theme .surface-card--accent {
    background: rgba(15, 28, 52, 0.82);
    border-image: linear-gradient(180deg, var(--dark-primary), var(--accent-color)) 1;
}

.dark-theme .surface-card--elevated {
    background: rgba(25, 40, 65, 0.88);
    box-shadow: var(--shadow-lg);
}

/* ������: �������� swirl / ���� fon.jpg � ������ ��������� �������� �� html */
.content--canvas {
    display: none;
}

/* On mobile, keep some transparency so swirl shows through */
@media (max-width: 768px) {
    .header-nav {
        width: calc(100% - 16px);
        min-width: 0;
        max-width: calc(100vw - 16px);
        padding: 10px 12px;
    }

    .container {
        background: linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(245, 248, 255, 0.86));
        padding: 20px 16px;
        border-radius: 22px;
        margin: 12px 14px;
        max-width: min(100%, 720px);
    }

    .surface-card {
        background: linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(248, 250, 255, 0.84));
        padding: 16px 14px;
        border-radius: 18px;
        margin-bottom: 14px;
    }
    
    .header-nav {
        min-width: 0;
        width: calc(100% - 12px);
        max-width: 100%;
        padding: 8px 10px;
        border-radius: 18px;
        margin: 8px auto;
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.25);
        box-sizing: border-box;
    }
    
    .header-nav .nav-container {
        gap: 6px;
        width: 100%;
        justify-content: space-between;
        flex-wrap: nowrap;
        min-width: 0;
    }
    
    .header-nav .logo {
        padding-left: 2px;
        margin-right: 0;
        min-width: 0;
        flex: 1 1 auto;
        overflow: hidden;
    }
    
    .header-nav .logo .logo-heading {
        font-size: 0.9em;
        gap: 5px;
        min-width: 0;
    }
    
    .header-nav .logo-title {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .header-nav .logo-emoji {
        font-size: 0.8em;
        flex-shrink: 0;
    }
    
    .header-nav .nav-buttons {
        padding-right: 0;
        margin-left: 8px;
        gap: 6px;
        flex-shrink: 0;
        flex-wrap: nowrap;
    }
    
    .header-nav .nav-btn {
        padding: 8px 10px;
        font-size: 0;
        max-width: none;
        min-width: 40px;
        min-height: 40px;
        gap: 0;
        justify-content: center;
    }
    
    .header-nav .nav-btn .nav-btn-text {
        display: none !important;
    }
    
    .header-nav .nav-btn i {
        font-size: 1rem;
        margin: 0;
    }
    
    .header-nav .nav-btn .nav-theme-icon, .header-nav .nav-btn .nav-inline-icon {
        width: 20px;
        height: 20px;
        min-width: 20px;
        min-height: 20px;
        margin: 0;
        display: block;
    }
    
    .header-nav #profileBtn {
        max-width: none;
    }
}

@media (max-width: 420px) {
    .header-nav {
        width: calc(100% - 8px);
        padding: 7px 8px;
        border-radius: 14px;
        margin: 6px auto;
    }
    
    .nav-container {
        gap: 4px;
    }
    
    .logo {
        padding-left: 0;
    }
    
    .logo .logo-heading {
        font-size: 0.8em;
        gap: 3px;
    }
    
    .logo-emoji {
        font-size: 0.7em;
    }
    
    .header-nav .nav-btn {
        padding: 7px 8px;
        font-size: 0;
        max-width: 48px;
        min-width: 40px;
        gap: 0;
    }
    
    .header-nav .nav-btn i {
        font-size: 1.05rem;
    }
}

@media (max-width: 480px) {
    .header-nav {
        padding: 8px 12px;
        border-radius: 16px;
        margin: 6px 8px;
    }
    
    .nav-container {
        gap: 8px;
    }
    
    .logo .logo-heading {
        font-size: 1em;
    }
    
    .logo-emoji {
        font-size: 0.9em;
    }
    
    .header-nav .nav-btn {
        padding: 8px 10px;
        font-size: 0;
        max-width: none;
        gap: 0;
    }
    
    .header-nav .nav-btn .nav-btn-text {
        display: none !important;
    }
    
    .header-nav .nav-btn i {
        font-size: 1.05rem;
    }
    
    .header-nav #profileBtn {
        max-width: none;
    }
}

@media (max-width: 480px) {
    .container {
        background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 255, 0.96));
    }

    .surface-card {
        background: linear-gradient(145deg, rgba(255, 255, 255, 0.99), rgba(238, 242, 255, 0.97));
    }
}

/* ��� ��������: ��������� ������������ �������� �� html (��. ����� �����) */

body {
    font-family: var(--font-display);
    background: transparent;
    min-height: 100vh;
    padding: 0;
    color: var(--text-primary);
    transition: background-color var(--transition), color var(--transition);
    position: relative;
}

body.dark-theme {
    background: transparent;
    color: var(--dark-text);
}

/* Header Navigation: glassmorphism */
.header-nav {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 255, 0.95) 100%);
    backdrop-filter: blur(12px) saturate(120%);
    -webkit-backdrop-filter: blur(12px) saturate(120%);
    border: 1.5px solid rgba(37, 99, 235, 0.2);
    padding: 12px 24px;
    border-radius: 999px;
    width: fit-content;
    min-width: 760px;
    margin: 8px auto;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow:
        0 4px 28px rgba(37, 99, 235, 0.1),
        0 2px 12px rgba(15, 23, 42, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.98);
    transition: background-color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

.header-nav:hover {
    box-shadow:
        0 8px 36px rgba(37, 99, 235, 0.14),
        0 3px 14px rgba(15, 23, 42, 0.07),
        inset 0 1px 0 rgba(255, 255, 255, 1);
}

.header-nav.theme-switching {
    box-shadow:
        0 0 56px rgba(37, 99, 235, 0.45),
        0 8px 28px rgba(124, 58, 237, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 1);
}

.dark-theme .header-nav {
    background: rgba(20, 32, 60, 0.85);
    backdrop-filter: blur(24px) saturate(200%);
    -webkit-backdrop-filter: blur(24px) saturate(200%);
    border: 1.5px solid rgba(96, 165, 250, 0.2);
    box-shadow: 0 0 30px rgba(96, 165, 250, 0.25), 0 4px 16px rgba(0, 0, 0, 0.3);
}

.dark-theme .header-nav:hover {
    box-shadow: 0 0 40px rgba(96, 165, 250, 0.35), 0 6px 20px rgba(0, 0, 0, 0.35);
}

.dark-theme .header-nav.theme-switching {
    box-shadow: 0 0 55px rgba(96, 165, 250, 0.5), 0 6px 20px rgba(0, 0, 0, 0.4);
}

.header-nav i, .nav-btn i { font-size: 1.05em; }

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    gap: 20px;
}

.logo {
    flex-shrink: 0;
    margin-right: auto;
    padding-left: 8px;
}

.logo .logo-heading {
    color: var(--text-primary);
    font-size: 1.35em;
    margin: 0;
    font-weight: 800;
    transition: color var(--transition);
    font-family: var(--font-display);
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-emoji {
    font-size: 1.15em;
}

.dark-theme .logo .logo-heading {
    color: var(--dark-text);
}

.nav-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: auto;
    padding-right: 4px;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border: 1.5px solid rgba(37, 99, 235, 0.18);
    color: var(--text-primary);
    padding: 10px 18px;
    border-radius: 999px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 7px;
    font-weight: 600;
    font-size: 13px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.1);
    text-decoration: none;
    font-family: var(--font-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 145px;
}

.nav-btn:hover {
    background: #ffffff;
    border-color: rgba(37, 99, 235, 0.38);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.22);
    color: var(--primary-color);
}

.nav-btn.secondary {
    background: rgba(255, 255, 255, 0.88);
    color: var(--text-primary);
    border-color: rgba(37, 99, 235, 0.14);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08);
}

.dark-theme .nav-btn {
    background: rgba(20, 32, 60, 0.82);
    border-color: rgba(96, 165, 250, 0.2);
    color: var(--dark-text);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.dark-theme .nav-btn:hover {
    background: rgba(30, 48, 85, 0.95);
    color: var(--dark-primary);
}

.nav-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.dark-theme .nav-btn:hover {
    border-color: rgba(96, 165, 250, 0.35);
    color: var(--dark-primary);
}

.nav-btn.secondary:hover {
    background: linear-gradient(145deg, #ffffff, #f0f4ff);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: var(--shadow-clay);
}

.dark-theme .nav-btn.secondary {
    color: var(--dark-text);
    border-color: var(--dark-border);
}

.dark-theme .nav-btn.secondary:hover {
    background: var(--dark-surface);
    border-color: var(--dark-primary);
    color: var(--dark-primary);
}

.nav-btn i {
    font-size: 1.2em;
    transition: var(--transition);
    flex-shrink: 0;
}

.nav-btn:hover i {
    transform: scale(1.1);
}

/* �����: ������� .nav-btn { max-width: 145px } ������ �����������/�Ҹ���� ����+SVG � ��� ���������� ������ */
.header-nav .nav-btn {
    max-width: min(280px, 36vw);
}

/* Header: email visible on desktop/tablet; truncated so the bar does not stretch */
.header-nav #profileBtn {
    max-width: min(300px, 42vw);
}

.header-nav .nav-btn .email-trunc {
    display: inline-block;
    max-width: min(220px, 28vw);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}

/* Font Awesome 4: ������ � font-size:0 ��� ������� �������� � ������ ����� � rem, �� � em */
.header-nav .nav-btn i.fa {
    font-size: 1.1rem;
    line-height: 1;
}

/* ����: ������� SVG � currentColor � ��� �� ����, ��� � fa-graduation-cap / fa-user */
.header-nav .nav-btn .nav-theme-icon, .header-nav .nav-btn .nav-inline-icon {
    width: 1.15rem;
    height: 1.15rem;
    min-width: 1.15rem;
    min-height: 1.15rem;
    flex: 0 0 auto;
    flex-shrink: 0;
    align-self: center;
    aspect-ratio: 1;
    display: block;
    color: inherit;
    overflow: visible;
    shape-rendering: geometricPrecision;
}

.btn .nav-theme-icon,
.btn-secondary .nav-theme-icon {
    width: 1.1em;
    height: 1.1em;
    vertical-align: -0.18em;
    margin-right: 0.35em;
    display: inline-block;
    color: inherit;
}

.container {
    max-width: 1200px;
    margin: 22px auto;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: var(--border-radius-2xl);
    padding: clamp(14px, 2vw, 22px) 40px 40px;
    box-shadow: var(--shadow-clay);
    border: 1px solid var(--glass-border);
    position: relative;
    /* �������� � overflow: hidden �� visible ��� �������������� ��������� �������� */
    overflow: visible;
    transition: var(--transition-slow);
    /* paint ������� ���� � ������ ��� hover/transform ������ �������� */
    contain: layout;
}

.container::before {
    content: '';
    display: none;
}

.container:hover {
    box-shadow: var(--shadow-clay-hover);
    transform: translateY(-4px);
    background: var(--glass-bg);
}

.dark-theme .container {
    background: var(--dark-glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-color: var(--dark-glass-border);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255,255,255,0.05);
}

.dark-theme .container:hover {
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255,255,255,0.08);
    border-color: rgba(96, 165, 250, 0.25);
}

/* CTA polish for hero buttons - pill-shaped & glowing */
.hero-cta { padding-top: 0; margin-top: -0.08rem; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; flex-shrink: 0; width: 100%; }
.hero-cta .btn { transition: var(--transition); will-change: transform; }
.hero-cta .btn-primary {
    padding: 14px 32px;
    font-size: 1.02rem;
    box-shadow:
        0 6px 28px rgba(37, 99, 235, 0.4),
        0 2px 8px rgba(124, 58, 237, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.hero-cta .btn-primary:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow:
        0 12px 40px rgba(37, 99, 235, 0.45),
        0 4px 12px rgba(124, 58, 237, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.hero-cta .btn-secondary { padding: 14px 28px; font-size: 0.98rem; }
.hero-cta .btn {
    margin: 0 !important;
}

/* �������: ��� CTA �� ������ � �� ������ ��������� � �������� ��������� */
@media (min-width: 541px) {
    .hero-message-stack {
        align-items: stretch;
    }

    .hero-cta {
        align-self: center;
        max-width: min(100%, var(--hero-copy-max-width));
        margin-left: auto;
        margin-right: auto;
        justify-content: center;
        align-items: center;
        box-sizing: border-box;
    }
}

@media (max-width: 540px) {
    /* ��� �� 541px+: ������� �� ��� ������ �������� � ����� ��������� � ������� ��������� ��� �������� */
    .hero-message-stack {
        align-items: stretch;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
        align-self: center;
        width: 100%;
        max-width: 380px;
        margin-left: auto;
        margin-right: auto;
        gap: 14px;
        padding-inline: 8px;
        box-sizing: border-box;
    }

    .hero-cta .btn-primary,
    .hero-cta .btn-secondary {
        width: 100%;
        max-width: 340px;
        box-sizing: border-box;
    }
}
.hero-section {
    text-align: center;
    margin-bottom: 22px;
    padding: clamp(2px, 0.55vw, 8px) 0 clamp(8px, 1.1vw, 14px);
    position: relative;
}

.hero-copy-fade-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: min(100%, var(--hero-copy-max-width));
    margin: 0 auto;
    padding-inline: clamp(6px, 2.2vw, 16px);
    box-sizing: border-box;
    flex-shrink: 0;
    transition: opacity 0.55s ease;
    opacity: 1;
}

.hero-message-stack {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    gap: clamp(0.2rem, 0.55vh, 0.48rem);
}

.hero-copy-fade-wrap.hero-copy--dim {
    opacity: 0.22;
}

.dark-theme .hero-copy-fade-wrap.hero-copy--dim {
    opacity: 0.28;
}

.hero-title-lines-root {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 100%;
    margin-inline: auto;
    box-sizing: border-box;
    text-align: center;
}

/* ���������� ����: ��������� ������ �� ������ + ���� � ������� ������ (��� ����� ������ �� DOM). */
.hero-title-type-slot {
    position: relative;
    width: 100%;
    min-height: var(--hero-type-min-height, 0);
    text-align: center;
    isolation: isolate;
}

.hero-title-type-ghost {
    display: block;
    visibility: hidden;
    pointer-events: none;
    user-select: none;
    width: 100%;
    text-align: center;
    white-space: normal;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
    -webkit-hyphens: none;
    text-wrap: wrap;
}

.hero-title-type-live {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    box-sizing: border-box;
    z-index: 1;
}

.hero-section h1 .hero-title-type-live-inner.hero-title-line {
    width: 100%;
    margin: 0;
    text-align: center;
    white-space: normal;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
    -webkit-hyphens: none;
    text-wrap: wrap;
}

.hero-title-type-text {
    display: inline;
    hyphens: none;
    -webkit-hyphens: none;
    overflow-wrap: normal;
    word-break: normal;
    text-wrap: wrap;
}

.hero-title-type-visible {
    display: inline;
}

.hero-title-type-tail {
    display: inline;
    visibility: hidden;
    pointer-events: none;
    user-select: none;
    white-space: normal;
    word-break: normal;
    overflow-wrap: normal;
}

/* ������ ���������: ��� �pretty� � ��� �������� ��������� � ���������� ����� �����, ��� ��������� ������ */
.hero-section h1 .hero-title-type-slot,
.hero-section h1 .hero-title-type-slot * {
    text-wrap: wrap !important;
    hyphens: none !important;
    -webkit-hyphens: none !important;
    hyphenate-character: '';
    word-break: normal;
    overflow-wrap: normal;
    line-break: auto;
}

.hero-title-line-caret {
    display: inline-block;
    width: 0;
    height: 0.82em;
    margin-left: 0.05em;
    vertical-align: -0.07em;
    border-left: max(2px, 0.1em) solid currentColor;
    border-radius: 1px;
    background: none;
    overflow: visible;
    animation: heroTypingCaretBlink 1.05s steps(1, end) infinite;
}

@keyframes heroTypingCaretBlink {
    0%,
    49% {
        opacity: 1;
    }
    50%,
    100% {
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-title-line-caret {
        animation: none;
        opacity: 1;
    }
}

.hero-glow {
    position: absolute;
    width: min(600px, 100vw);
    height: min(600px, 100vw);
    left: 50%;
    top: 10%;
    transform: translate(-50%, -50%);
    background: radial-gradient(
        circle,
        rgba(37, 99, 235, 0.2) 0%,
        rgba(124, 58, 237, 0.14) 26%,
        rgba(236, 72, 153, 0.1) 42%,
        rgba(14, 165, 233, 0.09) 58%,
        transparent 74%
    );
    pointer-events: none;
    z-index: 0;
    animation: none;
    opacity: 0.78;
}

@keyframes heroPulse {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.75; transform: translate(-50%, -50%) scale(1.04); }
}

.dark-theme .hero-glow {
    background: radial-gradient(circle, rgba(96,165,250,0.15) 0%, rgba(139,92,246,0.06) 40%, transparent 70%);
}

.hero-badge {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    border-radius: var(--border-radius-full);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #1d4ed8;
    background: linear-gradient(135deg, rgba(219, 234, 254, 0.95), rgba(237, 233, 254, 0.85));
    border: 1px solid rgba(37, 99, 235, 0.28);
    margin-bottom: 0.16rem;
    animation: fadeInUp 0.7s ease-out both;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.12);
}

.dark-theme .hero-badge {
    color: var(--dark-primary);
    background: rgba(96, 165, 250, 0.1);
    border-color: rgba(96, 165, 250, 0.2);
}

.hero-badge-dot {
    position: relative;
    display: inline-block;
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.35);
    vertical-align: middle;
    animation: dotPulse 2.2s ease-in-out infinite;
}

.hero-badge-dot::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1px solid rgba(34, 197, 94, 0.4);
    animation: dotPulseRing 2.2s ease-out infinite;
    pointer-events: none;
}

@keyframes dotPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.35), 0 0 6px rgba(34, 197, 94, 0.45); }
    50% { transform: scale(1.2); box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2), 0 0 12px rgba(34, 197, 94, 0.55); }
}

@keyframes dotPulseRing {
    0% { transform: scale(0.85); opacity: 0.75; }
    70% { transform: scale(1.6); opacity: 0; }
    100% { transform: scale(1.6); opacity: 0; }
}

.hero-features {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    max-width: 960px;
    margin: 2.5rem auto 0;
    text-align: left;
}

.hero-feature-card {
    padding: 28px 26px;
    border-radius: var(--border-radius-xl);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.98) 0%, rgba(239, 246, 255, 0.55) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-md);
    animation: fadeInUp 0.75s ease-out both;
    animation-delay: var(--delay, 0s);
    transition: var(--transition-slow);
}

.hero-feature-card:hover {
    transform: translateY(-8px) scale(1.03);
    background: #ffffff;
    border-color: rgba(37, 99, 235, 0.15);
    box-shadow: var(--shadow-lg);
}

.dark-theme .hero-feature-card {
    background: rgba(25, 40, 65, 0.75);
    border-color: rgba(71, 85, 105, 0.25);
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.05);
}

.dark-theme .hero-feature-card:hover {
    background: rgba(30, 50, 80, 0.88);
    box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.08);
}

.hero-feature-card strong {
    display: block;
    font-size: 1.05rem;
    margin-bottom: 0.35rem;
    color: var(--text-primary);
    font-family: var(--font-display);
}

.dark-theme .hero-feature-card strong {
    color: var(--dark-text);
}

.hero-feature-card span:last-child {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.dark-theme .hero-feature-card span:last-child {
    color: var(--dark-text-secondary);
}

.hero-feature-icon {
    display: block;
    font-size: 2rem;
    margin-bottom: 0.6rem;
    animation: none;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

/* ������� ������ �� ������� */
.landing-testimonials {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0.7rem auto 2.5rem;
    text-align: center;
}

.landing-testimonials__title {
    font-family: var(--font-display);
    font-size: clamp(1.05rem, 2.4vw, 1.35rem);
    font-weight: 700;
    margin: 0 0 0.65rem;
    color: var(--text-primary);
}

.dark-theme .landing-testimonials__title {
    color: var(--dark-text);
}

.landing-testimonials__card {
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius-xl);
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.97) 0%, rgba(239, 246, 255, 0.55) 100%);
    border: 1px solid rgba(59, 130, 246, 0.14);
    box-shadow: var(--shadow-md);
    height: 200px;
    max-width: 860px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    overflow: hidden;
    position: relative;
}

.dark-theme .landing-testimonials__card {
    background: rgba(25, 40, 65, 0.75);
    border-color: rgba(96, 165, 250, 0.2);
}

.landing-testimonials__stars {
    color: #f59e0b;
    font-size: 1.15rem;
    letter-spacing: 0.12em;
    line-height: 1;
}

body.dark-theme .landing-testimonials__stars {
    color: #f59e0b !important;
}

.landing-testimonials__quote {
    margin: 0;
    font-size: clamp(0.9rem, 2vw, 1.02rem);
    line-height: 1.55;
    color: var(--text-secondary);
    font-style: italic;
}

.dark-theme .landing-testimonials__quote {
    color: var(--dark-text-secondary);
}

.landing-testimonials__meta {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-secondary);
    opacity: 0.95;
}

.dark-theme .landing-testimonials__meta {
    color: var(--dark-text-secondary);
}

.landing-testimonials__fade-wrap {
    width: 100%;
    transition:
        opacity 520ms cubic-bezier(0.25, 0.46, 0.45, 1),
        transform 520ms cubic-bezier(0.25, 0.46, 0.45, 1),
        filter 520ms cubic-bezier(0.25, 0.46, 0.45, 1);
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

@media (prefers-reduced-motion: reduce) {
    .landing-testimonials__fade-wrap {
        transition: opacity 0.2s ease;
    }

    .landing-testimonials__fade-wrap.landing-testimonials--dim {
        transform: none;
        filter: none;
    }
}

.landing-testimonials__fade-wrap.landing-testimonials--dim {
    opacity: 0;
    transform: translateY(7px);
    filter: blur(1.25px);
}

.landing-testimonials__fade-wrap.landing-testimonials--rising {
    animation: testimonialsRiseIn 620ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@media (prefers-reduced-motion: reduce) {
    .landing-testimonials__fade-wrap.landing-testimonials--rising {
        animation: none;
    }
}

/* ����� �� ������ ����� (�� �� ��������� ������): CTA hero �������� ���� ����� ����� � ���� ������� ������ */
@media (max-height: 940px) and (min-width: 601px) {
    .landing-testimonials {
        margin-top: 0.55rem;
    }

    .landing-testimonials__title {
        font-size: clamp(0.98rem, 2.1vw, 1.18rem);
        margin-bottom: 0.35rem;
    }

    .landing-testimonials__card {
        min-height: 180px;
        padding: 0.95rem 1.15rem 1.05rem;
        gap: 0.45rem;
    }

    .landing-testimonials__quote {
        line-height: 1.55;
    }

    .hero-badge {
        margin-bottom: 0.28rem;
        padding: 0.32rem 0.9rem;
        font-size: 0.76rem;
    }



.stats-bar {
        margin-top: 12px;
        margin-bottom: 12px;
        gap: 14px;
    }
}

@media (max-height: 880px) and (min-width: 601px) {
    .hero-section h1 {
        font-size: clamp(1.62rem, 3.15vw, 2.62rem);
        line-height: 1.14;
        margin-bottom: 0.32rem;
    }

    .hero-section .subtitle {
        font-size: clamp(0.98rem, 1.85vw, 1.14rem);
        line-height: 1.36;
        margin-bottom: 4px;
    }

    .hero-message-stack {
        gap: clamp(0.42rem, 1.1vh, 0.85rem);
    }

    .hero-section h1 .emoji.hero-emoji {
        margin-bottom: 0;
    }
}

@keyframes testimonialsRiseIn {
    from {
        opacity: 0;
        transform: translateY(10px);
        filter: blur(1px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

.pro-section-callout {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 18px;
    padding: 14px 18px;
    margin-bottom: 1.1rem;
    border-radius: var(--border-radius-lg);
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(37, 99, 235, 0.07));
    border: 1px solid rgba(124, 58, 237, 0.22);
    box-shadow: var(--shadow-sm);
}

.dark-theme .pro-section-callout {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.18), rgba(37, 99, 235, 0.12));
    border-color: rgba(167, 139, 250, 0.35);
}

.pro-section-callout__text {
    margin: 0;
    flex: 1 1 220px;
    font-size: 0.95rem;
    line-height: 1.45;
    color: var(--text-secondary);
}

.dark-theme .pro-section-callout__text {
    color: var(--dark-text-secondary);
}

.pro-section-callout .btn {
    flex-shrink: 0;
}

#prepareTab .btn-row .btn.btn-outline-plan {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    flex: 1 1 150px;
    min-width: min(100%, 132px);
    max-width: 100%;
}

.btn.btn-outline-plan {
    white-space: normal;
    line-height: 1.35;
    height: auto;
    min-height: 44px;
    padding: 10px 14px;
    overflow: visible;
    text-overflow: unset;
    max-width: min(100%, 440px);
    text-align: center;
}

.payment-actions--stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
}

.payment-actions--stack .btn {
    width: 100%;
    /* � ������� flex-grow � .payment-actions .btn ���������� ������ �� ������ */
    flex: 0 0 auto;
}

/** ������� ������: ���������� ������ (���������� .btn ������� ���������� ��� ����� �����) */
#paymentModal .payment-modal-content {
    padding: 26px 22px 22px;
}

#paymentModal .payment-actions--stack {
    gap: 8px;
    margin-top: 14px;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
}

#paymentModal .payment-actions--stack .btn {
    margin: 0;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.32;
    border-radius: 10px;
    min-height: 0;
    flex: 0 0 auto;
    align-self: stretch;
    box-shadow: var(--shadow-sm);
}

#paymentModal .payment-actions--stack .btn-secondary {
    border-color: rgba(37, 99, 235, 0.28);
    background: rgba(255, 255, 255, 0.98);
}

.dark-theme #paymentModal .payment-actions--stack .btn-secondary {
    border-color: rgba(148, 163, 184, 0.42);
    background: rgba(30, 41, 59, 0.88);
}

#paymentModal .payment-actions--stack .btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

#paymentModal .payment-actions--stack .btn:active:not(:disabled) {
    transform: translateY(0);
}

#paymentModal .payment-actions--stack .btn-primary:hover:not(:disabled) {
    transform: translateY(-1px) scale(1);
}

#paymentModal .payment-actions--stack .btn-secondary:hover:not(:disabled) {
    transform: translateY(-1px) scale(1);
}

.review-modal-lead {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0 0 12px;
}

.dark-theme .review-modal-lead {
    color: var(--dark-text-secondary);
}

.review-rating-group {
    margin-bottom: 14px;
}

.review-rating-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.dark-theme .review-rating-label {
    color: var(--dark-text);
}

.review-stars-input {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.review-star-btn {
    margin: 0;
    padding: 2px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 2rem;
    line-height: 1;
    color: rgba(148, 163, 184, 0.9);
    transition: color 0.15s ease, transform 0.15s ease;
    border-radius: 8px;
}

.review-star-btn:hover,
.review-star-btn:focus-visible {
    color: #fbbf24;
    transform: scale(1.06);
    outline: none;
}

.review-star-btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.35);
}

.review-star-btn.is-active {
    color: #f59e0b;
}

.dark-theme .review-star-btn {
    color: rgba(148, 163, 184, 0.9) !important;
}

.dark-theme .review-star-btn:hover,
.dark-theme .review-star-btn:focus-visible {
    color: #fbbf24 !important;
}

.dark-theme .review-star-btn.is-active {
    color: #f59e0b !important;
}

.review-published-stars {
    font-size: 1.05rem;
    letter-spacing: 0.08em;
    margin: 0 0 6px;
    line-height: 1.2;
}

.review-published-stars-filled {
    color: #f59e0b;
}

.review-published-stars-empty {
    color: rgba(148, 163, 184, 0.55);
}

body.dark-theme .review-published-stars-filled {
    color: #f59e0b !important;
}

body.dark-theme .review-published-stars-empty {
    color: rgba(148, 163, 184, 0.55) !important;
}

.review-published-separator {
    list-style: none;
    padding: 14px 0 6px;
    margin: 0;
    border-bottom: none;
}

.review-published-separator-text {
    display: block;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-align: center;
}

.dark-theme .review-published-separator-text {
    color: var(--dark-text-muted);
}

.review-published-item--landing .review-published-text {
    font-style: italic;
}

.review-list-heading {
    margin: 1.25rem 0 0.5rem;
    font-size: 1rem;
    font-weight: 700;
}

.review-published-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 220px;
    overflow-y: auto;
}

.review-published-item {
    padding: 10px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
    font-size: 0.92rem;
    line-height: 1.5;
}

.review-published-item--empty {
    color: var(--text-secondary);
    font-style: italic;
    border-bottom: none;
}

.review-published-text {
    margin: 0 0 6px;
}

.review-published-who {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.review-submit-status {
    min-height: 1.25rem;
    margin: 8px 0 0;
    font-size: 0.9rem;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-5px) rotate(2deg); }
    75% { transform: translateY(-3px) rotate(-2deg); }
}

.hero-section h1 {
    position: relative;
    z-index: 1;
    font-size: clamp(1.85rem, 3.5vw, 2.95rem);
    margin-bottom: 0.12rem;
    padding-block: 0 0;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-primary);
    line-height: 1.16;
    font-weight: 800;
    letter-spacing: -0.03em;
    animation: fadeInUp 0.85s ease-out;
    font-family: var(--font-display);
    text-wrap: wrap;
    overflow-wrap: normal;
    word-break: normal;
    word-wrap: normal;
    hyphens: none;
    -webkit-hyphens: none;
}

@supports (text-wrap: pretty) {
    .hero-section h1 {
        text-wrap: pretty;
    }
    /* ���� ������: �pretty� �� h1 ��� �������� �������� (����. ���-� / ����������) � ��������� ��� ����� � typewriter */
    .hero-section h1:has(.hero-title-type-slot) {
        text-wrap: wrap;
        hyphens: none;
        -webkit-hyphens: none;
    }
}

/* ������� ����: ��������� � ��������, ��� ������ ������� */
body:not(.dark-theme) .hero-section h1 {
    color: #0c1222;
    text-shadow:
        0 1px 0 rgba(255, 255, 255, 0.95),
        0 2px 20px rgba(37, 99, 235, 0.08),
        0 4px 40px rgba(124, 58, 237, 0.06);
}

.hero-section h1 .emoji.hero-emoji {
    display: block;
    margin: 0 auto 0.08em;
}

.hero-section h1 .hero-title-line {
    display: block;
    width: 100%;
    text-align: center;
    text-wrap: wrap;
    word-wrap: normal;
    hyphens: none;
    -webkit-hyphens: none;
    overflow-wrap: normal;
    word-break: normal;
}

@supports (text-wrap: pretty) {
    /* �� ��������� pretty � ���� ������ � ����� ������� ���� ��������� �������� �� ������ */
    .hero-section h1 .hero-title-line:not(.hero-title-type-live-inner) {
        text-wrap: pretty;
    }
}

.hero-section h1 .hero-title-line + .hero-title-line {
    margin-top: 0.03em;
}

.dark-theme .hero-section h1 {
    color: var(--dark-text);
}

.hero-section .subtitle {
    position: relative;
    z-index: 1;
    color: var(--text-secondary);
    font-family: var(--font-handwritten);
    font-size: clamp(1.05rem, 2.05vw, 1.28rem);
    margin-bottom: 0.1rem;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.42;
    letter-spacing: 0.015em;
    animation: fadeInUp 0.85s ease-out 0.2s both;
    font-weight: 400;
    text-wrap: pretty;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
    -webkit-hyphens: none;
    padding-inline: 0;
}

.dark-theme .hero-section .subtitle {
    color: var(--dark-text-secondary);
}

.hero-section .subtitle .hero-subtitle-chunk {
    display: block;
}

/* ����� ��� ������� ������ � ������������ */
.hero-subtitle-type-slot {
    position: relative;
    display: block;
    width: 100%;
}

.hero-subtitle-type-ghost {
    visibility: hidden;
    display: block;
    user-select: none;
    pointer-events: none;
}

.hero-subtitle-type-live {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    text-wrap: wrap;
    word-break: normal;
    overflow-wrap: normal;
}

.hero-subtitle-type-visible {
    font-family: inherit;
    font-weight: inherit;
}

.hero-section .subtitle .hero-subtitle-chunk + .hero-subtitle-chunk {
    margin-top: 0.35em;
}

/* ������������ ��� CTA: �� �� �������, ��� � ��������� */
.hero-message-stack > .subtitle {
    max-width: min(100%, var(--hero-copy-max-width));
    padding-inline: clamp(6px, 2.2vw, 16px);
    box-sizing: border-box;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stats-bar {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 280px));
    justify-content: center;
    justify-items: stretch;
    gap: 18px;
    margin: 18px auto 16px;
    max-width: min(100%, 620px);
    align-items: stretch;
}

.stats-bar .stat {
    padding: 22px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100%;
    box-sizing: border-box;
    /* ��������� � ���������� .hero-feature-card (�������, ��� ������� .stat) */
    border-radius: var(--border-radius-2xl);
    box-shadow: var(--shadow-md), 0 2px 0 rgba(255, 255, 255, 0.12) inset;
}

.stat {
    padding: 28px;
    border-radius: var(--border-radius-lg);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-clay);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: linear-gradient(145deg, #3b82f6, #2563eb 45%, #1d4ed8);
}

.stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(145deg, rgba(255,255,255,0.15), transparent);
    pointer-events: none;
}

.stat:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: var(--shadow-clay-hover);
    border-color: rgba(255, 255, 255, 0.4);
}

.dark-theme .stat {
    border-color: rgba(255, 255, 255, 0.1);
}

.dark-theme .stat:hover {
    border-color: rgba(255, 255, 255, 0.2);
}



.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 10px;
    position: relative;
    z-index: 2;
}

.stats-bar .stat-number {
    font-size: 2.15em;
    margin-bottom: 8px;
    line-height: 1.12;
}

.stats-bar .stat-label {
    font-size: 0.95rem;
    line-height: 1.4;
    padding: 0 2px;
}

/* ������ �������� PRO ������ �������� �������� */
.stat.stat--hero-pro-banner {
    border: none;
    cursor: pointer;
    font: inherit;
    color: inherit;
    width: 100%;
    text-align: center;
    align-items: center;
}

.hero-pro-banner__kicker {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    opacity: 0.92;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    position: relative;
    z-index: 2;
}

.hero-pro-banner__title {
    display: block;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 8px 0 0;
    position: relative;
    z-index: 2;
}

.stat--hero-pro-banner--subscribed .hero-pro-banner__title {
    font-size: 1.12rem;
    margin-top: 4px;
}

/* ����� �� ����� ��������� ������� � ����� (������� � ����� ����) */
.stat.stat--hero-pro-banner .hero-pro-banner__kicker,
.stat.stat--hero-pro-banner .hero-pro-banner__title {
    color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.scroll-top-fab {
    position: fixed;
    bottom: max(20px, env(safe-area-inset-bottom, 0px));
    right: max(16px, env(safe-area-inset-right, 0px));
    z-index: 4900;
    width: 52px;
    height: 52px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.38);
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 55%, #7c3aed 100%);
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: 0 10px 32px rgba(37, 99, 235, 0.38);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    isolation: isolate;
}

.scroll-top-fab__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scrollTopArrowNudge 1.35s ease-in-out infinite;
}

.scroll-top-fab__icon {
    width: 1.35em;
    height: 1.35em;
    display: block;
    color: inherit;
}

@media (max-width: 768px) {
    .scroll-top-fab__arrow {
        animation: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .scroll-top-fab__arrow {
        animation: none;
    }
}

@keyframes scrollTopArrowNudge {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(-5px); opacity: 0.92; }
}

.scroll-top-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 40px rgba(37, 99, 235, 0.45);
}

.scroll-top-fab:hover .scroll-top-fab__arrow {
    animation-duration: 0.85s;
}

.dark-theme .scroll-top-fab {
    border-color: rgba(148, 163, 184, 0.35);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.payment-legal-note {
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--text-secondary);
    margin-top: 12px;
}

.dark-theme .payment-legal-note {
    color: var(--dark-text-secondary);
}

.payment-legal-note a {
    color: var(--primary-color);
    text-decoration: underline;
}

.dark-theme .payment-legal-note a {
    color: var(--dark-primary);
}

.stat-label {
    font-size: 1em;
    opacity: 0.9;
    position: relative;
    z-index: 2;
    font-weight: 500;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    margin-top: 10px;
    overflow: hidden;
    position: relative;
    z-index: 2;
}

.progress-fill {
    height: 100%;
    background-color: white;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.stat::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1%, transparent 20%);
    opacity: 0;
    transition: var(--transition);
}

.stat:hover::before {
    opacity: 1;
}

h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 2.5em;
}

.subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1em;
}

/* === AIRY PILLS-SHAPED TABS === */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 28px;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(59,130,246,0.25) transparent;
    padding: 10px 6px 14px;
    box-sizing: border-box;
}

.tabs::-webkit-scrollbar { height: 4px; }
.tabs::-webkit-scrollbar-track { background: transparent; }
.tabs::-webkit-scrollbar-thumb { background: rgba(59,130,246,0.25); border-radius: 4px; }

.tab {
    padding: 14px 28px;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--border-radius-full);
    cursor: pointer;
    font-size: 15px;
    color: var(--text-secondary);
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: var(--shadow-xs);
    font-family: var(--font-primary);
    font-weight: 600;
    position: relative;
    will-change: transform;
}

.tab .tab-icon {
    font-size: 0.7em;
    opacity: 0;
    margin-right: 6px;
    vertical-align: middle;
    transition: opacity 0.3s ease;
}

.tab.active .tab-icon {
    opacity: 1;
}

.tab:hover {
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.85);
    transform: none;
    box-shadow: var(--shadow-md);
    border-color: rgba(59, 130, 246, 0.22);
}

.tab.active {
    color: white;
    background: linear-gradient(135deg, #3b82f6, #6d28d9);
    border-color: transparent;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4), inset 0 1px 0 rgba(255,255,255,0.25);
    font-weight: 700;
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 25%;
    right: 25%;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.9), transparent);
    border-radius: 3px;
}

.dark-theme .tab {
    background: rgba(25, 38, 58, 0.7);
    backdrop-filter: blur(10px);
    color: var(--dark-text-secondary);
    border-color: rgba(71, 85, 105, 0.3);
}

.dark-theme .tab.active {
    background: linear-gradient(135deg, #60A5FA, #7c3aed);
    color: white;
    box-shadow: 0 6px 20px rgba(96,165,250,0.4), inset 0 1px 0 rgba(255,255,255,0.2);
}

.dark-theme .tab:hover {
    background: rgba(35, 52, 80, 0.85);
    color: var(--dark-primary);
}

.learning-section {
    max-width: var(--vb-main-content-max-width);
    margin: 0 auto;
    padding: 30px 20px;
}

#dashboardTab .dashboard-section {
    max-width: var(--vb-main-content-max-width);
    margin-inline: auto;
    width: 100%;
    box-sizing: border-box;
}

.level-progress {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.level-info {
    background: var(--surface-color);
    border-radius: var(--border-radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.dark-theme .level-info {
    background: var(--dark-surface);
    border-color: var(--dark-border);
}

.level-info h3 {
    margin-bottom: 20px;
    color: var(--text-primary);
    font-size: 1.5em;
}

.dark-theme .level-info h3 {
    color: var(--dark-text);
}

.level-progress-bar {
    width: 100%;
    height: 12px;
    background-color: var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    margin: 20px 0;
}

.dark-theme .level-progress-bar {
    background-color: var(--dark-border);
}

.level-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 6px;
    transition: width 0.5s ease;
}

.levels-container, .level-rewards, .level-tasks {
    background: var(--surface-color);
    border-radius: var(--border-radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.dark-theme .levels-container,
.dark-theme .level-rewards,
.dark-theme .level-tasks {
    background: var(--dark-surface);
    border-color: var(--dark-border);
}

.dark-theme .level-card {
    background: linear-gradient(150deg, #334155 0%, #3d4f92 48%, #4f46e5 100%);
    color: #f8fafc;
}

.dark-theme .level-card.locked,
.dark-theme .level-card.level-locked {
    background: linear-gradient(150deg, #475569 0%, #5c657f 55%, #4d578c 100%);
    opacity: 0.92;
    filter: none;
}

.dark-theme .level-card.level-current {
    border-color: rgba(129, 140, 248, 0.95);
    box-shadow:
        0 12px 32px rgba(79, 70, 229, 0.35),
        0 0 0 2px rgba(165, 180, 252, 0.55);
}

.levels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(212px, 1fr));
    gap: 18px;
    margin-top: 20px;
}

.level-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    text-align: left;
    min-height: 228px;
    background: linear-gradient(152deg, #4f7dff 0%, #2563eb 42%, #1d4ed8 100%);
    border-radius: var(--border-radius-lg);
    padding: 20px 18px 18px;
    color: #fff;
    box-shadow:
        0 10px 28px rgba(37, 99, 235, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
    transition:
        transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.35s ease,
        border-color 0.25s ease;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.28);
}

.level-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 18px 40px rgba(37, 99, 235, 0.33),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.45);
}

.level-card.locked,
.level-card.level-locked {
    background: linear-gradient(155deg, #94a3d6 0%, #7c87be 45%, #6f799f 100%);
    opacity: 1;
    filter: none;
    cursor: not-allowed;
    box-shadow:
        0 8px 22px rgba(71, 85, 105, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.level-card.level-locked:hover {
    transform: translateY(-2px);
}

.level-card.level-current {
    border-color: rgba(255, 255, 255, 0.95);
    box-shadow:
        0 14px 36px rgba(59, 130, 246, 0.45),
        0 0 0 2px rgba(255, 255, 255, 0.65);
}

.level-card-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
}

.level-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1 1 auto;
    margin-top: 14px;
    width: 100%;
}

.level-number {
    font-size: clamp(2rem, 4.6vw, 2.65rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    text-shadow: 0 1px 2px rgba(15, 23, 42, 0.15);
}

.level-badge {
    display: block;
    font-size: clamp(0.92rem, 2.4vw, 1.06rem);
    font-weight: 750;
    line-height: 1.38;
    hyphens: none;
    -webkit-hyphens: none;
    word-break: normal;
    overflow-wrap: anywhere;
    max-width: 100%;
}

.level-xp-required {
    font-size: 0.82rem;
    font-weight: 650;
    letter-spacing: 0.01em;
    opacity: 0.96;
    margin: 0;
}

.level-unlock-bonus {
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.48;
    opacity: 0.94;
    margin: 0;
    hyphens: none;
    -webkit-hyphens: none;
    word-break: normal;
    overflow-wrap: anywhere;
}

.level-lock-icon {
    margin-top: auto;
    padding-top: 10px;
    font-size: 1.15rem;
    text-align: center;
    opacity: 0.92;
}

.level-title {
    font-size: 1.1em;
    opacity: 0.9;
}

.rewards-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.reward-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: var(--surface-elevated);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.dark-theme .reward-item {
    background: var(--dark-surface);
    border-color: var(--dark-border);
}

.reward-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.reward-icon {
    font-size: 2.5em;
}

.reward-details h4 {
    margin-bottom: 5px;
    color: var(--text-primary);
}

.dark-theme .reward-details h4 {
    color: var(--dark-text);
}

.reward-details p {
    color: var(--text-secondary);
    font-size: 0.9em;
}

.dark-theme .reward-details p {
    color: var(--dark-text-secondary);
}

.tasks-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.task-item {
    padding: 25px;
    background: var(--surface-elevated);
    border-radius: var(--border-radius);
    border-left: 5px solid var(--primary-color);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 16px;
}

.task-checkbox {
    flex-shrink: 0;
    color: var(--primary-color);
    font-size: 1.35rem;
    line-height: 1.25;
    padding-top: 2px;
}

.task-checkbox .fa-check-circle {
    color: var(--success-color);
}

.task-content {
    flex: 1;
    min-width: 0;
}

.task-xp {
    flex-shrink: 0;
    text-align: right;
    min-width: 4.5rem;
}

.dark-theme .task-item {
    background: var(--dark-surface);
    border-color: var(--dark-border);
}

.task-item.completed {
    border-left-color: var(--success-color);
    opacity: 0.8;
}

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

.dark-theme .task-item h4 {
    color: var(--dark-text);
}

.task-item p {
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-size: 0.9em;
}

.dark-theme .task-item p {
    color: var(--dark-text-secondary);
}

.task-progress {
    display: flex;
    align-items: center;
    gap: 10px;
}

.task-progress-bar {
    flex-grow: 1;
    height: 8px;
    background-color: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.task-progress-fill {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.scenario-section, .speech-text-section {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-weight: 600;
}

.dark-theme label {
    color: var(--dark-text);
}

select, input[type="text"], input[type="number"], input[type="email"], input[type="password"], textarea {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid rgba(59, 130, 246, 0.15);
    border-radius: var(--border-radius);
    font-size: 16px;
    background: linear-gradient(145deg, #ffffff, #f5f8ff);
    font-family: var(--font-primary);
    box-shadow: inset 4px 4px 8px rgba(0, 0, 0, 0.05), inset -4px -4px 8px rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    /* ������������� zoom �� iOS ��� ������ */
    touch-action: manipulation;
}

select:focus, input[type="text"]:focus, input[type="number"]:focus, input[type="email"]:focus, input[type="password"]:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: inset 6px 6px 12px rgba(0, 0, 0, 0.08), inset -6px -6px 12px rgba(255, 255, 255, 1), 0 0 0 4px rgba(59, 130, 246, 0.15);
    /* ������������� zoom �� ��������� ��� ������ */
    font-size: 16px;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

.recording-section {
    text-align: center;
    margin: 30px 0;
}

/* === AIRY PILLSHAPE BUTTONS === */
.btn {
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: var(--border-radius-full);
    cursor: pointer;
    margin: 0 8px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    font-family: var(--font-primary);
    will-change: transform, box-shadow;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover:not(:disabled)::before {
    left: 100%;
}

.btn:hover:not(:disabled) {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.btn:active:not(:disabled) {
    transform: translateY(-2px) scale(0.99);
    box-shadow: var(--shadow-md);
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 48%, #7c3aed 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: var(--shadow-md), 0 4px 18px rgba(37, 99, 235, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.dark-theme .btn-primary {
    background: linear-gradient(135deg, #60A5FA, #8b5cf6);
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.15);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #1d4ed8, #6366f1 45%, #6d28d9);
    box-shadow: var(--shadow-lg), 0 10px 32px rgba(37, 99, 235, 0.4), inset 0 1px 0 rgba(255,255,255,0.28);
    transform: translateY(-5px) scale(1.03);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    color: var(--text-primary);
    border: 1px solid rgba(37, 99, 235, 0.16);
}

.dark-theme .btn-secondary {
    background: rgba(30, 41, 59, 0.82);
    backdrop-filter: blur(8px);
    color: var(--dark-text);
    border-color: rgba(71, 85, 105, 0.25);
}

.btn-secondary:hover:not(:disabled) {
    background: #ffffff;
    border-color: rgba(37, 99, 235, 0.28);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.dark-theme .btn-secondary:hover:not(:disabled) {
    background: rgba(40, 55, 80, 0.95);
    border-color: rgba(96, 165, 250, 0.25);
}

.btn-danger {
    background: linear-gradient(135deg, #f87171, #dc2626);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.2);
}

.btn-danger:hover:not(:disabled) {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    box-shadow: var(--shadow-lg), 0 8px 24px rgba(239,68,68,0.35), inset 0 1px 0 rgba(255,255,255,0.25);
    transform: translateY(-5px) scale(1.03);
}

.btn-small {
    padding: 10px 20px;
    font-size: 13px;
    border-radius: var(--border-radius-full);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* PRO �������������, �� ������ ����������� � �������� ��� ��������� (�� �����������) */
.btn.btn-secondary.btn-disabled-pro,
.btn.btn-small.btn-secondary.btn-disabled-pro {
    opacity: 0.82;
    cursor: pointer;
    pointer-events: auto;
    transform: none !important;
    filter: saturate(0.95);
}

.btn.btn-secondary.btn-disabled-pro:hover,
.btn.btn-small.btn-secondary.btn-disabled-pro:hover {
    transform: none !important;
    box-shadow: var(--shadow-sm);
}

.dark-theme .btn.btn-secondary.btn-disabled-pro,
.dark-theme .btn.btn-small.btn-secondary.btn-disabled-pro {
    opacity: 0.84;
}

.status {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.status.recording {
    background: #ffe6e6;
    color: #e74c3c;
}

.dark-theme .status.recording {
    background: rgba(255, 230, 230, 0.2);
    color: #ff8a80;
}

.status.processing {
    background: #fff3cd;
    color: #856404;
}

.dark-theme .status.processing {
    background: rgba(255, 243, 205, 0.2);
    color: #e6d8ad;
}

.status.analyzing {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.08), rgba(var(--secondary-rgb), 0.06));
    color: var(--primary-color);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    border-radius: var(--border-radius-xl);
    padding: 18px 24px;
}

.dark-theme .status.analyzing {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--dark-primary);
    border-color: rgba(var(--primary-rgb), 0.3);
}

.analyzing-dots {
    display: flex;
    gap: 6px;
    align-items: center;
}

.analyzing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-color);
    animation: analyzingBounce 1.4s ease-in-out infinite;
}

.dark-theme .analyzing-dot {
    background: var(--dark-primary);
}

.analyzing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.analyzing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes analyzingBounce {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.4;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

.analyzing-text {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.recording-time-policy {
    font-size: 0.86rem;
    line-height: 1.5;
    color: var(--text-secondary);
    margin: 0 0 8px;
    max-width: 40rem;
}

.recording-limit-hint {
    font-size: 0.88rem;
    line-height: 1.45;
    color: #b45309;
    background: rgba(251, 191, 36, 0.18);
    border: 1px solid rgba(245, 158, 11, 0.45);
    border-radius: var(--border-radius);
    padding: 10px 12px;
    margin: 0 0 8px;
    max-width: 40rem;
}

.recording-limit-hint.hidden {
    display: none !important;
}

.dark-theme .recording-time-policy {
    color: var(--dark-text-secondary);
}

.dark-theme .recording-limit-hint {
    color: #fcd34d;
    background: rgba(180, 83, 9, 0.25);
    border-color: rgba(251, 191, 36, 0.35);
}

.timer {
    font-size: 2em;
    font-weight: bold;
    color: var(--primary-color);
    margin-top: 10px;
}

.dark-theme .timer {
    color: var(--dark-primary);
}

.analysis {
    margin-top: 32px;
    padding: 32px;
    position: relative;
    scroll-margin-top: calc(96px + env(safe-area-inset-top, 0px));
}

.analysis.hidden {
    display: none;
}

.analysis-title {
    color: var(--text-primary);
    margin-bottom: 28px;
    font-size: 1.6rem;
    font-weight: 800;
    font-family: var(--font-display);
    letter-spacing: -0.02em;
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    scroll-margin-top: calc(104px + env(safe-area-inset-top, 0px));
}

.analysis-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 60%;
    background: linear-gradient(180deg, var(--primary-color), var(--accent-color));
    border-radius: 3px;
}

.analysis-title {
    padding-left: 24px;
}

.analysis::before {
    content: '';
    position: absolute;
    top: 0;
    left: 32px;
    right: 32px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), transparent);
    opacity: 0.3;
    border-radius: 2px;
}

.dark-theme .analysis::before {
    background: linear-gradient(90deg, var(--dark-primary), var(--accent-color), transparent);
    opacity: 0.2;
}

.analysis-title::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 3px;
}

.dark-theme .analysis-title {
    color: var(--dark-text);
}

.analysis-skeleton {
    margin-bottom: 20px;
}

.analysis-skeleton.hidden {
    display: none;
}

.feedback-section,
.recommendations-section {
    margin-top: 32px;
    padding: 28px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(16px);
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.9);
}

.feedback-section:empty,
.recommendations-section:empty {
    display: none;
}

.dark-theme .feedback-section,
.dark-theme .recommendations-section {
    background: rgba(20, 32, 60, 0.85);
    border-color: rgba(71, 85, 105, 0.35);
}

.feedback-section h3,
.recommendations-section h3 {
    color: var(--primary-color);
    margin-bottom: 18px;
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.feedback-section h3::before {
    content: '??';
    font-size: 1.4rem;
}

.recommendations-section h3::before {
    content: '??';
    font-size: 1.4rem;
}

.score-circle {
    text-align: center;
    margin: 30px 0;
}

.score-svg .score-ring-bg {
    stroke: var(--border-color);
}

.dark-theme .score-svg .score-ring-bg {
    stroke: var(--dark-border);
}

.score-svg .score-ring-fill {
    stroke: var(--primary-color);
    stroke-linecap: round;
    transition: stroke-dashoffset 1.1s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark-theme .score-svg .score-ring-fill {
    stroke: var(--dark-primary);
}

.score-svg .score-text {
    fill: var(--text-primary);
}

.dark-theme .score-svg .score-text {
    fill: var(--dark-text);
}

.dark-theme .score-circle {
    color: var(--dark-text);
}

.score-label {
    margin-top: 10px;
    font-weight: 600;
    color: #666;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.metric-card {
    background: linear-gradient(145deg, #ffffff, #f0f5ff);
    padding: 26px;
    border-radius: var(--border-radius-lg);
    border-left: 4px solid var(--primary-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-clay);
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--border-radius-lg);
    background: linear-gradient(145deg, rgba(255,255,255,0.4), transparent);
    pointer-events: none;
}

.metric-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: var(--shadow-clay-hover);
    border-left-color: var(--secondary-color);
}

.metric-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: var(--transition);
}

.metric-card:hover::after {
    opacity: 1;
}

.dark-theme .metric-card {
    background: var(--dark-surface);
    border-color: var(--dark-border);
}

.dark-theme .metric-card:hover {
    border-left-color: var(--dark-primary);
}

.dark-theme .metric-card::after {
    background: linear-gradient(90deg, var(--dark-primary), var(--dark-secondary));
}

.dark-theme .metric-icon {
    color: var(--dark-primary);
}

.dark-theme .metric-card:hover .metric-icon {
    color: var(--dark-secondary);
}

.dark-theme .metric-title {
    color: var(--dark-primary);
}

.dark-theme .metric-card:hover .metric-title {
    color: var(--dark-secondary);
}

.dark-theme .metric-value {
    color: var(--dark-text);
}

.metric-icon {
    font-size: 2.2em;
    margin-bottom: 15px;
    color: var(--primary-color);
    transition: var(--transition);
}

.metric-card:hover .metric-icon {
    transform: scale(1.1);
    color: var(--secondary-color);
}

.metric-title {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.2em;
    transition: var(--transition);
}

.metric-card:hover .metric-title {
    color: var(--secondary-color);
}

.metric-value {
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.metric-rating {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    margin: 5px 0;
}

.rating-excellent {
    background: #d4edda;
    color: #155724;
}

.dark-theme .rating-excellent {
    background: rgba(212, 237, 218, 0.2);
    color: #a3d9b1;
}

.rating-good {
    background: #d1ecf1;
    color: #0c5460;
}

.dark-theme .rating-good {
    background: rgba(209, 236, 241, 0.2);
    color: #9cd3e0;
}

.rating-medium {
    background: #fff3cd;
    color: #856404;
}

.dark-theme .rating-medium {
    background: rgba(255, 243, 205, 0.2);
    color: #e6d8ad;
}

.rating-poor {
    background: #f8d7da;
    color: #721c24;
}

.dark-theme .rating-poor {
    background: rgba(248, 215, 218, 0.2);
    color: #e6a8ad;
}

.metric-comment {
    color: #666;
    font-size: 0.9em;
    margin-top: 10px;
}

.dark-theme .metric-comment {
    color: var(--dark-text-secondary);
}

.charts-section {
    margin: 28px 0 20px;
    padding: 0;
    background: transparent;
}

.chart-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.summary-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px) saturate(200%);
    -webkit-backdrop-filter: blur(16px) saturate(200%);
    border-radius: 24px;
    padding: 22px 18px;
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 2px solid rgba(255, 255, 255, 0.95);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.summary-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    background: rgba(255, 255, 255, 1);
}

.dark-theme .summary-card {
    background: rgba(20, 32, 60, 0.85);
    border-color: rgba(71, 85, 105, 0.35);
}

.dark-theme .summary-card:hover {
    background: rgba(30, 48, 85, 0.95);
    border-color: rgba(96, 165, 250, 0.4);
}

.summary-emoji {
    font-size: 1.75rem;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.summary-card--main {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(139, 92, 246, 0.08));
    border: 2px solid rgba(59, 130, 246, 0.2);
}

.summary-card--main .summary-emoji {
    font-size: 2.5rem;
}

.summary-card--main .summary-value {
    font-size: 2rem;
}

.summary-card--main .summary-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-color);
}

.dark-theme .summary-card--main {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.15), rgba(139, 92, 246, 0.1));
    border-color: rgba(96, 165, 250, 0.3);
}

.dark-theme .summary-card--main .summary-label {
    color: var(--dark-primary);
}

.summary-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.02em;
    font-family: 'Montserrat', sans-serif;
}

.dark-theme .summary-value {
    color: var(--dark-primary);
}

.summary-label {
    font-size: 0.72rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dark-theme .summary-label {
    color: var(--dark-text-secondary);
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.charts-grid--main {
    margin-bottom: 20px;
}

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

/* === ENHANCED CHART CARDS === */
.chart-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.chart-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 12px;
}

.dark-theme .chart-icon {
    background: rgba(96, 165, 250, 0.15);
}

.chart-header-text {
    flex: 1;
}

.chart-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px) saturate(200%);
    -webkit-backdrop-filter: blur(20px) saturate(200%);
    border-radius: 24px;
    padding: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.95);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

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

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

.chart-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    background: rgba(255, 255, 255, 0.98);
}

.chart-card--wide {
    grid-column: 1 / -1;
}

.chart-card--main {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(245, 250, 255, 0.9));
}

.dark-theme .chart-card--main {
    background: linear-gradient(135deg, rgba(25, 40, 70, 0.95), rgba(20, 32, 60, 0.9));
}

.chart-card--accent {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(139, 92, 246, 0.04));
    border: 1px solid rgba(59, 130, 246, 0.15);
}

.dark-theme .chart-card--accent {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.1), rgba(139, 92, 246, 0.05));
    border-color: rgba(96, 165, 250, 0.2);
}

.chart-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 8px 12px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 12px;
}

.dark-theme .chart-meta {
    background: rgba(96, 165, 250, 0.15);
}

.chart-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
}

.dark-theme .chart-value {
    color: var(--dark-primary);
}

.chart-unit {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dark-theme .chart-unit {
    color: var(--dark-text-muted);
}

.tempo-range {
    display: flex;
    justify-content: space-between;
    padding: 8px 16px;
    margin: 12px 0;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
}

.dark-theme .tempo-range {
    background: rgba(255, 255, 255, 0.05);
    color: var(--dark-text-muted);
}

.tempo-stats {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.dark-theme .tempo-stats {
    border-color: rgba(255, 255, 255, 0.08);
}

.tempo-stat {
    text-align: center;
    padding: 8px 16px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.03);
}

.dark-theme .tempo-stat {
    background: rgba(255, 255, 255, 0.05);
}

.tempo-stat--optimal {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.dark-theme .tempo-stat--optimal {
    background: rgba(34, 197, 94, 0.2);
}

.tempo-stat-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.dark-theme .tempo-stat-label {
    color: var(--dark-text-secondary);
}

.tempo-stat-range {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.dark-theme .tempo-stat-range {
    color: var(--dark-text-muted);
}

.filler-examples {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 12px;
}

.dark-theme .filler-examples {
    background: rgba(255, 255, 255, 0.05);
}

.filler-examples-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.dark-theme .filler-examples-label {
    color: var(--dark-text-secondary);
}

.filler-example-badge {
    display: inline-flex;
    padding: 4px 12px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-color);
}

.chart-legend-custom {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 12px;
    padding: 8px 16px;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 12px;
}

.dark-theme .chart-legend-custom {
    background: rgba(96, 165, 250, 0.08);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.dark-theme .legend-item {
    color: var(--dark-text-secondary);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-item--you .legend-dot {
    background: var(--primary-color);
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.5);
}

.legend-item--target .legend-dot {
    border: 3px dashed #16A34A;
    box-sizing: border-box;
}

.dark-theme .legend-item--you .legend-dot {
    background: var(--dark-primary);
    box-shadow: 0 0 8px rgba(96, 165, 250, 0.5);
}

.dark-theme .legend-item--target .legend-dot {
    border-color: #86efac;
    background: radial-gradient(circle, rgba(134, 239, 172, 0.45) 0%, rgba(134, 239, 172, 0.12) 55%, transparent 56%);
    box-shadow: 0 0 0 1px rgba(134, 239, 172, 0.35);
}

@keyframes shimmerSlide {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.dark-theme .chart-card {
    background: rgba(20, 32, 60, 0.9);
    border-color: rgba(71, 85, 105, 0.35);
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.05);
}

.dark-theme .chart-card::before {
    background: linear-gradient(90deg, var(--dark-primary), var(--accent-color));
}

.dark-theme .chart-card:hover {
    background: rgba(30, 48, 80, 0.95);
}

.dark-theme .chart-card::before {
    display: none;
}

.dark-theme .chart-card:hover {
    background: rgba(30, 48, 85, 0.9);
    box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.07);
}

.chart-card-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.dark-theme .chart-card-title {
    color: var(--dark-text);
}

.chart-card-desc {
    margin: 4px 0 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.chart-toggle-btn {
    margin-left: auto;
    padding: 8px 14px;
    font-size: 1rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.chart-toggle-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: scale(1.05);
}

.dark-theme .chart-toggle-btn {
    background: rgba(96, 165, 250, 0.15);
    border-color: rgba(96, 165, 250, 0.3);
}

.dark-theme .chart-toggle-btn:hover {
    background: rgba(96, 165, 250, 0.25);
}

@media (max-width: 768px) {
    .chart-card--main .chart-header {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .chart-card--main .chart-header-text {
        flex: 1 1 100%;
        min-width: 0;
        padding-right: 0;
    }

    .chart-card--main .chart-toggle-btn {
        margin-left: 0;
        margin-top: 4px;
        max-width: 100%;
        box-sizing: border-box;
    }

    .chart-card {
        padding: 16px 14px 18px;
        border-radius: 22px;
    }

    .chart-wrap {
        padding: 10px 4px 6px;
    }

    .chart-wrap--radar {
        min-height: 320px;
        height: 320px;
    }
}

.dark-theme .chart-card-desc {
    color: var(--dark-text-secondary);
}

.chart-wrap {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 8px;
}

.chart-wrap--radar {
    min-height: 260px;
    height: 260px;
    padding: 8px;
}

#metricsChartWrap {
    transition: opacity 0.22s cubic-bezier(0.4, 0, 0.2, 1), transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center center;
}

#metricsChartWrap.chart-metrics-swap--out {
    opacity: 0;
    transform: scale(0.94);
}

@media (prefers-reduced-motion: reduce) {
    #metricsChartWrap {
        transition-duration: 0.01ms;
    }

    #metricsChartWrap.chart-metrics-swap--out {
        transform: none;
    }
}

.chart-wrap--bar {
    min-height: 140px;
    height: 140px;
    padding: 8px;
}

.chart-wrap canvas {
    max-height: 100%;
    width: 100% !important;
    height: 100% !important;
    transition: transform 0.3s ease;
}

/* Chart.js ����� ������ ���; height:100%!important ������ ��������� WebKit, ���� ������� ����� �� ����� */
#analysis .chart-wrap canvas {
    height: auto !important;
    max-height: none !important;
}

@media (hover: hover) and (pointer: fine) {
    .chart-wrap:hover canvas {
        transform: scale(1.02);
    }
}

.chart-insight {
    margin-top: 20px;
    text-align: center;
    animation: fadeInUp 0.5s ease-out both;
}

.insight-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: 20px;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.4;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08); }
    50% { box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12); }
}

.insight-badge:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.15);
}

.insight-badge--success {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.2), rgba(34, 197, 94, 0.15));
    color: #16A34A;
    border: 1px solid rgba(22, 163, 74, 0.4);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.15);
}

.dark-theme .insight-badge--success {
    background: rgba(22, 163, 74, 0.2);
    color: #4ade80;
    border-color: rgba(22, 163, 74, 0.4);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.2);
}

.insight-badge--warning {
    background: rgba(217, 119, 6, 0.15);
    color: #D97706;
    border: 1px solid rgba(217, 119, 6, 0.3);
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.15);
}

.dark-theme .insight-badge--warning {
    background: rgba(217, 119, 6, 0.2);
    color: #fbbf24;
    border-color: rgba(217, 119, 6, 0.4);
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.2);
}

.insight-badge--danger {
    background: rgba(220, 38, 38, 0.15);
    color: #DC2626;
    border: 1px solid rgba(220, 38, 38, 0.3);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.15);
}

.dark-theme .insight-badge--danger {
    background: rgba(220, 38, 38, 0.2);
    color: #f87171;
    border-color: rgba(220, 38, 38, 0.4);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

.chart-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
}

.chart-empty-message {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    padding: 0 10px;
}

.dark-theme .chart-empty-message {
    color: var(--dark-text-secondary);
}

.chart-empty-icon {
    display: block;
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.structure-section {
    margin-top: 8px;
}

.structure-visual {
    margin-top: 20px;
    min-height: auto;
}

.structure-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.structure-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 20px;
    border-radius: 20px;
    border: 2px solid rgba(59, 130, 246, 0.1);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.structure-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(59, 130, 246, 0.15);
}

.structure-item--done {
    border-color: rgba(22, 163, 74, 0.3);
    background: linear-gradient(135deg, rgba(240, 253, 244, 0.95), rgba(255, 255, 255, 0.9));
}

.structure-item--done:hover {
    box-shadow: 0 12px 28px rgba(22, 163, 74, 0.2);
}

.structure-item--missing {
    border-color: rgba(220, 38, 38, 0.2);
    background: linear-gradient(135deg, rgba(254, 242, 242, 0.95), rgba(255, 255, 255, 0.9));
}

.structure-item--missing:hover {
    box-shadow: 0 12px 28px rgba(220, 38, 38, 0.15);
}

.dark-theme .structure-item {
    background: rgba(20, 32, 60, 0.8);
    border-color: rgba(71, 85, 105, 0.25);
}

.dark-theme .structure-item:hover {
    background: rgba(30, 48, 85, 0.9);
}

.dark-theme .structure-item--done {
    border-color: rgba(22, 163, 74, 0.4);
    background: linear-gradient(135deg, rgba(20, 50, 40, 0.9), rgba(25, 40, 60, 0.8));
}

.dark-theme .structure-item--missing {
    border-color: rgba(220, 38, 38, 0.3);
    background: linear-gradient(135deg, rgba(50, 25, 25, 0.9), rgba(25, 40, 60, 0.8));
}

.structure-item-icon {
    font-size: 1.75rem;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 14px;
}

.structure-item--done .structure-item-icon {
    background: rgba(22, 163, 74, 0.15);
}

.structure-item--missing .structure-item-icon {
    background: rgba(220, 38, 38, 0.1);
}

.dark-theme .structure-item-icon {
    background: rgba(96, 165, 250, 0.15);
}

.dark-theme .structure-item--done .structure-item-icon {
    background: rgba(22, 163, 74, 0.2);
}

.dark-theme .structure-item--missing .structure-item-icon {
    background: rgba(220, 38, 38, 0.15);
}

.structure-item-body {
    flex: 1;
    min-width: 0;
}

.structure-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.structure-item-label {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
}

.dark-theme .structure-item-label {
    color: var(--dark-text);
}

.structure-item-status {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 999px;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.structure-item--done .structure-item-status {
    background: rgba(22, 163, 74, 0.15);
    color: #16A34A;
}

.structure-item--missing .structure-item-status {
    background: rgba(220, 38, 38, 0.12);
    color: #DC2626;
}

.dark-theme .structure-item--done .structure-item-status {
    background: rgba(22, 163, 74, 0.25);
    color: #4ade80;
}

.dark-theme .structure-item--missing .structure-item-status {
    background: rgba(220, 38, 38, 0.25);
    color: #f87171;
}

.structure-item-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.dark-theme .structure-item-desc {
    color: var(--dark-text-secondary);
}

.structure-score-bar {
    margin-top: 24px;
    padding: 20px;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 16px;
}

.dark-theme .structure-score-bar {
    background: rgba(96, 165, 250, 0.08);
}

@media (max-width: 600px) {
    .structure-score-bar {
        margin-top: 16px;
        padding: 12px 14px;
    }

    .structure-score-hint {
        font-size: 0.74rem;
    }
}

.structure-score-track {
    height: 14px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
}

.dark-theme .structure-score-track {
    background: rgba(96, 165, 250, 0.15);
}

.structure-score-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 8px;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.structure-score-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}

.dark-theme .structure-score-label {
    color: var(--dark-text);
}

.structure-score-hint {
    margin: 10px 0 0;
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--text-muted);
    font-weight: 500;
}

.dark-theme .structure-score-hint {
    color: #94a3b8;
}

.structure-comment {
    margin-top: 16px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    padding: 14px 16px;
    background: rgba(59, 130, 246, 0.08);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

.structure-basis-note {
    margin-top: 12px;
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--text-muted);
}

.structure-basis-note--warn {
    color: #b45309;
}

.dark-theme .structure-basis-note--warn {
    color: #fbbf24;
}

.dark-theme .structure-comment {
    background: rgba(96, 165, 250, 0.1);
    border-left-color: var(--dark-primary);
    color: var(--dark-text-secondary);
}

.dark-theme .charts-section {
    background: transparent;
}

.dark-theme .structure-comment {
    background: rgba(var(--primary-rgb), 0.08);
    color: var(--dark-text-secondary);
}

.dark-theme .charts-section {
    background: transparent;
}

.feedback-section, .recommendations-section {
    margin: 32px 0 0;
    padding: 24px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.9);
}

.feedback-section:empty, .recommendations-section:empty {
    display: none;
    margin: 0;
    padding: 0;
}

.dark-theme .feedback-section,
.dark-theme .recommendations-section {
    background: rgba(20, 32, 60, 0.7);
    border-color: rgba(71, 85, 105, 0.25);
}

.feedback-section h3, .recommendations-section h3 {
    color: var(--primary-color);
    margin-bottom: 18px;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.feedback-section h3::before {
    content: '??';
}

.recommendations-section h3::before {
    content: '??';
}

.feedback-summary {
    margin-bottom: 14px;
}

.feedback-summary-score {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.1));
    border-radius: 14px;
    margin-bottom: 12px;
    border: 1px solid rgba(148, 163, 184, 0.22);
}

.feedback-emoji {
    font-size: clamp(2rem, 6vw, 2.6rem);
    line-height: 1;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.08));
    flex-shrink: 0;
}

.feedback-summary-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.feedback-score-label {
    font-size: var(--text-heading-md);
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.feedback-score-value {
    font-size: var(--text-caption);
    color: var(--text-secondary);
    font-weight: 600;
}

.dark-theme .feedback-summary-score {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.15), rgba(139, 92, 246, 0.15));
}

.dark-theme .feedback-score-label {
    color: var(--dark-text);
}

.dark-theme .feedback-score-value {
    color: var(--dark-text-secondary);
}

.feedback-content {
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    margin-top: 4px;
}

.feedback-content p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.55;
    font-size: var(--text-caption);
    font-weight: 500;
}

.dark-theme .feedback-content {
    background: rgba(20, 32, 60, 0.6);
    border-color: rgba(71, 85, 105, 0.2);
}

.dark-theme .feedback-content p {
    color: var(--dark-text-secondary);
}

.analysis-disclaimer {
    color: var(--text-secondary);
    margin: 16px 0 0;
    font-size: 0.9rem;
    line-height: 1.6;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.12);
}

.dark-theme .analysis-disclaimer {
    background: rgba(96, 165, 250, 0.1);
    border-color: rgba(96, 165, 250, 0.2);
    color: var(--dark-text-secondary);
}

.analysis-meta-hint {
    color: var(--text-secondary);
    margin: 10px 0 0;
    font-size: 0.88rem;
    line-height: 1.55;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(217, 119, 6, 0.08);
    border: 1px solid rgba(217, 119, 6, 0.2);
}

.analysis-meta-hint--warn {
    background: rgba(220, 38, 38, 0.08);
    border-color: rgba(220, 38, 38, 0.22);
}

.dark-theme .analysis-meta-hint {
    color: var(--dark-text-secondary);
    background: rgba(251, 191, 36, 0.08);
    border-color: rgba(251, 191, 36, 0.2);
}

.dark-theme .analysis-meta-hint--warn {
    background: rgba(248, 113, 113, 0.1);
    border-color: rgba(248, 113, 113, 0.25);
}

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

.recommendation-item {
    background: rgba(255, 255, 255, 0.85);
    padding: 18px 20px;
    margin: 14px 0;
    border-radius: 18px;
    border: 1px solid rgba(59, 130, 246, 0.1);
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    animation: slideInRight 0.5s ease-out both;
}

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

.recommendation-item:hover {
    transform: translateX(8px);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-lg);
    border-color: rgba(59, 130, 246, 0.25);
}

.dark-theme .recommendation-item {
    background: rgba(20, 32, 60, 0.8);
    border-color: rgba(71, 85, 105, 0.25);
}

.dark-theme .recommendation-item:hover {
    background: rgba(30, 48, 85, 0.95);
    border-color: rgba(96, 165, 250, 0.35);
}

.recommendation-item::before {
    content: '??';
    position: static;
    line-height: 1;
    flex: 0 0 auto;
    font-size: 1.3rem;
    filter: drop-shadow(0 2px 4px rgba(59, 130, 246, 0.3));
}

.recommendation-item:first-child {
    margin-top: 0;
}

.questions-section {
    margin-top: 40px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 12px;
}

.dark-theme .questions-section {
    background: var(--dark-surface);
}

.questions-section.hidden {
    display: none;
}

.questions-section h2 {
    color: #333;
    margin-bottom: 20px;
}

.question-card {
    background: white;
    padding: 20px;
    margin: 15px 0;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.dark-theme .question-card {
    background: var(--dark-surface);
}

.question-number {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.question-text {
    color: #333;
    font-size: 1.1em;
    margin-bottom: 15px;
}

.question-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
    align-items: stretch;
    overflow-wrap: normal;
    word-break: normal;
}

.question-actions .btn {
    flex: 1 1 clamp(148px, 48%, 100%);
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    text-align: center;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
    -webkit-hyphens: none;
    padding-inline: 12px;
    writing-mode: horizontal-tb;
    min-width: 0;
    box-sizing: border-box;
}

.question-actions .btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

.question-answer {
    margin-top: 6px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(var(--primary-rgb), 0.05);
    font-size: 0.95rem;
}

.question-check-result {
    margin-top: 8px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.question-check-result.correct {
    color: #16a34a;
}

.question-check-result.incorrect {
    color: #dc2626;
}

.history-section {
    margin-top: 24px;
    padding: 18px;
    border-radius: 12px;
    background: var(--light-color);
    border: 1px solid var(--border-color);
}

.dark-theme .history-section {
    background: var(--dark-surface);
    border-color: var(--dark-border);
}

.history-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px 14px;
    width: 100%;
    flex-wrap: wrap;
}

.history-head-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    flex-shrink: 0;
}

.history-collapse-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 200px;
    min-width: 0;
    padding: 6px 8px 6px 4px;
    margin: 0;
    border: none;
    background: transparent;
    font: inherit;
    text-align: left;
    cursor: pointer;
    border-radius: 10px;
    color: inherit;
    transition: background 0.15s ease;
}

.history-collapse-toggle:hover,
.history-collapse-toggle:focus-visible {
    background: rgba(var(--primary-rgb), 0.08);
    outline: none;
}

.dark-theme .history-collapse-toggle:hover,
.dark-theme .history-collapse-toggle:focus-visible {
    background: rgba(59, 130, 246, 0.12);
}

.history-collapse-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
}

.history-count-badge {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

.history-chevron {
    display: inline-flex;
    width: 1.25em;
    height: 1.25em;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
}

.history-chevron::before {
    content: "\25B6";
    font-size: 0.65em;
    line-height: 1;
    display: inline-block;
    transition: transform 0.2s ease;
}

.history-section.is-history-open .history-chevron::before {
    transform: rotate(90deg);
}

.history-list-panel {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

.dark-theme .history-list-panel {
    border-top-color: var(--dark-border);
}

/** ����� ��� ������ ����� ������� � ������ �������; ������ ����� ���������� ����� �������� DOM. */
.tab-history-slot {
    position: relative;
    z-index: 6;
}

.tab-history-slot:empty {
    display: none;
}

.tab-history-slot:not(:empty) {
    margin-top: 28px;
}

.history-compare-bar {
    margin-bottom: 20px;
    padding: 18px 20px 20px;
    border-radius: var(--border-radius-lg);
    background: linear-gradient(
        135deg,
        rgba(var(--primary-rgb), 0.1) 0%,
        rgba(var(--accent-rgb), 0.06) 48%,
        rgba(255, 255, 255, 0.55) 100%
    );
    border: 1px solid rgba(var(--primary-rgb), 0.18);
    box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(10px);
}

.dark-theme .history-compare-bar {
    background: linear-gradient(
        135deg,
        rgba(var(--primary-rgb), 0.18) 0%,
        rgba(15, 23, 42, 0.92) 55%,
        rgba(30, 41, 59, 0.88) 100%
    );
    border-color: rgba(96, 165, 250, 0.22);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.history-compare-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
}

.history-compare-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    font-size: 1.2rem;
    line-height: 1;
    background: linear-gradient(135deg, #3b82f6, #6366f1 48%, #7c3aed);
    color: #fff;
    box-shadow: 0 6px 18px rgba(59, 130, 246, 0.38);
}

.history-compare-title {
    margin: 0 0 6px;
    font-size: 1rem;
    font-weight: 780;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.history-compare-sub {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--text-muted);
    max-width: 52ch;
}

.history-compare-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 14px 16px;
}

.history-compare-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1 1 200px;
    min-width: min(100%, 220px);
}

.history-compare-field-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.74rem;
    font-weight: 750;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.history-compare-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 800;
    color: #fff;
}

.history-compare-badge--a {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.35);
}

.history-compare-badge--b {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    box-shadow: 0 3px 10px rgba(124, 58, 237, 0.32);
}

.history-compare-vs {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    align-self: flex-end;
    height: 42px;
    padding-bottom: 2px;
}

.history-compare-vs span {
    display: inline-block;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(var(--primary-rgb), 0.22);
    box-shadow: var(--shadow-xs);
}

.dark-theme .history-compare-vs span {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(96, 165, 250, 0.28);
    color: #94a3b8;
}

.history-compare-select {
    width: 100%;
    min-height: 42px;
    min-width: 0;
    border-radius: 12px;
    border: 1px solid rgba(37, 99, 235, 0.22);
    padding: 10px 38px 10px 14px;
    font: inherit;
    font-size: 0.9rem;
    color: var(--text-primary);
    background-color: var(--surface-elevated, #fff);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
    box-shadow: var(--shadow-xs);
    appearance: none;
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.dark-theme .history-compare-select {
    background-color: rgba(15, 23, 42, 0.92);
    border-color: rgba(96, 165, 250, 0.28);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2393c5fd' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

.history-compare-select:hover {
    border-color: rgba(37, 99, 235, 0.42);
}

.history-compare-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.22);
}

.history-compare-btn {
    flex-shrink: 0;
    align-self: flex-end;
    margin-left: auto;
    padding: 11px 24px;
    border: none;
    border-radius: 999px;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 750;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, #2563eb, #4f46e5 52%, #6366f1);
    box-shadow: 0 6px 22px rgba(79, 70, 229, 0.38);
    transition:
        transform 0.15s ease,
        box-shadow 0.2s ease,
        filter 0.15s ease;
}

.history-compare-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.06);
    box-shadow: 0 10px 28px rgba(79, 70, 229, 0.45);
}

.history-compare-btn:active {
    transform: translateY(0);
    filter: brightness(0.98);
}

.dark-theme .history-compare-btn {
    box-shadow: 0 6px 24px rgba(59, 130, 246, 0.28);
}

.history-compare-btn:focus-visible {
    outline: 2px solid rgba(147, 197, 253, 0.95);
    outline-offset: 3px;
}

@media (max-width: 640px) {
    .history-compare-bar {
        padding: 10px 12px 12px;
        margin-bottom: 12px;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .history-compare-head {
        margin-bottom: 8px;
        gap: 10px;
    }

    .history-compare-icon {
        width: 38px;
        height: 38px;
        font-size: 1.05rem;
        border-radius: 12px;
    }

    .history-compare-title {
        margin: 0 0 3px;
        font-size: 0.95rem;
    }

    .history-compare-sub {
        font-size: 0.78rem;
        line-height: 1.35;
    }

    .history-compare-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    /* ����� flex-grow:1 ����������� ������� �/�� �� ��� ������ ������� � �������� ���� */
    .history-compare-field {
        flex: 0 0 auto;
        gap: 4px;
    }

    .history-compare-field-label {
        font-size: 0.7rem;
    }

    .history-compare-vs {
        align-self: center;
        flex: 0 0 auto;
        height: auto;
        min-height: 0;
        padding: 1px 0;
        margin: 0;
    }

    .history-compare-vs span {
        padding: 5px 11px;
        font-size: 0.65rem;
    }

    .history-compare-select {
        min-height: 40px;
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .history-compare-btn {
        margin-left: 0;
        width: 100%;
        margin-top: 2px;
        padding: 10px 20px;
    }
}

.history-compare-result:not([hidden]) {
    margin-top: 14px;
}

.history-compare-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.history-compare-col {
    padding: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.35);
}

body.dark-theme .history-compare-col {
    background: rgba(15, 23, 42, 0.72);
    border-color: rgba(148, 163, 184, 0.24);
}

.history-compare-heading {
    font-size: 0.95rem;
    margin: 0 0 8px;
}

.history-compare-col-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.history-compare-col-head .history-compare-heading {
    margin: 0;
    flex: 1;
    min-width: 0;
    line-height: 1.35;
}

.history-compare-col-head .history-compare-open-btn {
    flex-shrink: 0;
    padding: 5px 12px;
    font-size: 0.78rem;
    font-weight: 650;
    line-height: 1.2;
    border-radius: 999px;
    white-space: nowrap;
    max-width: 100%;
}

@media (max-width: 520px) {
    .history-compare-col-head {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .history-compare-col-head .history-compare-open-btn {
        align-self: flex-start;
        width: auto;
    }
}

.history-compare-snippet {
    margin-top: 10px;
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.45;
}

.history-list {
    display: grid;
    gap: 10px;
}

.history-item {
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(var(--primary-rgb), 0.14);
    background: rgba(var(--primary-rgb), 0.045);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px 16px;
    align-items: center;
}

.history-item-main {
    min-width: 0;
}

.history-title {
    font-weight: 700;
    margin-bottom: 6px;
    font-size: 0.95rem;
    line-height: 1.35;
}

.history-meta {
    font-size: 0.86rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.35;
}

.history-open-btn,
.history-item .server-history-open-btn {
    grid-column: 2;
    align-self: center;
    justify-self: end;
    white-space: nowrap;
}

.history-open-btn {
    margin: 0;
    padding: 8px 12px;
    font-size: 0.8rem;
}

.learning-chapters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.learning-chapter-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border: 1px solid rgba(var(--primary-rgb), 0.18);
    background: linear-gradient(160deg, rgba(var(--primary-rgb), 0.07), var(--surface-color));
    border-radius: var(--border-radius);
    padding: 10px;
    transition: var(--transition);
    height: 100%;
}

.learning-chapter-wrap.is-active {
    border-color: rgba(var(--primary-rgb), 0.44);
    box-shadow: var(--shadow-md);
}

.learning-chapter-wrap.is-done {
    border-color: rgba(16, 185, 129, 0.45);
}

.learning-chapter-main {
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
    padding: 4px 2px 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font: inherit;
    color: inherit;
    width: 100%;
    flex: 1 1 auto;
    justify-content: flex-start;
}

.learning-chapter-main strong {
    color: var(--text-primary);
    font-size: 1.02rem;
}

.learning-chapter-meta {
    color: var(--text-secondary);
    font-size: 0.82rem;
}

.learning-chapter-snippet {
    font-size: 0.8rem;
    line-height: 1.45;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.learning-chapter-open-theory {
    align-self: stretch;
    justify-content: center;
    margin-top: auto;
}

.learning-chapter-top {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--primary-color);
}

.stat.stat--hero-learning {
    display: flex;
    text-align: center;
    background: linear-gradient(145deg, #5b21b6, #7c3aed 42%, #4f46e5);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 22px 20px;
}

/* ���� ��������: ������� �� �������, ��� � �������� �������� */
.stat.stat--hero-learning.stat--hero-account-only {
    border: none;
    cursor: pointer;
    font: inherit;
    color: inherit;
    width: 100%;
    padding: 22px 20px;
    justify-content: center;
}

.stat--hero-account-only .hero-learning-block-title {
    margin-bottom: 8px;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
}

.stat--hero-account-only .stat-learning-tier--account {
    font-size: 1.08rem;
    margin-bottom: 8px;
    line-height: 1.25;
}

.stat--hero-account-only .hero-account-xp {
    font-size: 0.88rem;
    margin-bottom: 6px;
    opacity: 0.95;
    line-height: 1.45;
    padding: 0 4px;
}

.stat--hero-account-only .stat-sublabel--muted {
    font-size: 0.8rem;
    margin-bottom: 10px;
    line-height: 1.35;
}

.stat--hero-account-only .progress-bar--learning {
    margin-top: 6px;
    height: 7px;
    border-radius: 999px;
    overflow: hidden;
}

.hero-learning-block {
    width: 100%;
}

.hero-learning-block + .hero-learning-block {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.28);
}

.hero-learning-block-title {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    opacity: 0.9;
    margin: 0 0 8px;
    color: rgba(255, 255, 255, 0.95);
}

.stat-learning-tier--account {
    font-size: 0.98rem;
    letter-spacing: 0.02em;
    text-transform: none;
    margin-bottom: 6px;
}

.stat-sublabel--muted {
    opacity: 0.78;
    font-size: 0.74rem;
    margin-bottom: 6px;
}

.progress-bar--account .progress-fill {
    background: linear-gradient(90deg, #fde68a, #fff);
}

.stat-learning-tier {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 4px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.stat-learning-points-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    margin: 4px 0 2px;
}

.stat-number--learning {
    font-size: 1.65rem;
    line-height: 1.1;
}

.stat-learning-points-label {
    font-size: 0.95rem;
    font-weight: 600;
    opacity: 0.95;
}

.stat-sublabel {
    font-size: 0.78rem;
    opacity: 0.92;
    margin-bottom: 8px;
}

.progress-bar--learning {
    margin-top: 4px;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.25);
}

.progress-bar--learning .progress-fill {
    border-radius: 999px;
    background: linear-gradient(90deg, #fff, #e0e7ff);
}

.learning-theory-teaser {
    padding: 8px 0 4px;
}

.learning-theory-teaser__chapter {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 10px;
}

.learning-theory-teaser__lead {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 16px;
    max-width: 52rem;
}

.learning-theory-teaser__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.learning-theory-drawer {
    position: fixed;
    inset: 0;
    z-index: 10060;
    pointer-events: none;
    visibility: hidden;
}

.learning-theory-drawer.is-open {
    pointer-events: auto;
    visibility: visible;
}

.learning-theory-drawer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.32s ease;
}

.learning-theory-drawer.is-open .learning-theory-drawer__backdrop {
    opacity: 1;
}

.learning-theory-drawer__panel {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: min(440px, 100%);
    max-width: 100vw;
    background: linear-gradient(180deg, var(--surface-elevated) 0%, var(--light-color) 100%);
    border-left: 1px solid rgba(var(--primary-rgb), 0.15);
    box-shadow: -12px 0 40px rgba(15, 23, 42, 0.12);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateX(100%);
    transition: transform 0.36s cubic-bezier(0.4, 0, 0.2, 1);
}

.learning-theory-drawer.is-open .learning-theory-drawer__panel {
    transform: translateX(0);
}

.learning-theory-drawer__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 20px 20px 12px;
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.1);
}

.learning-theory-drawer__eyebrow {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary-color);
    margin: 0 0 4px;
}

.learning-theory-drawer__title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
    color: var(--text-primary);
}

.learning-theory-drawer__close {
    flex-shrink: 0;
    align-self: flex-start;
    width: 40px;
    height: 40px;
    max-width: 44px;
    max-height: 44px;
    aspect-ratio: 1;
    border-radius: 12px;
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    background: rgba(var(--primary-rgb), 0.06);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.learning-theory-drawer__close:hover {
    background: rgba(var(--primary-rgb), 0.12);
}

.learning-theory-drawer__body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 20px 24px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-width: none;
}

.learning-theory-drawer__body::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.learning-theory-drawer__section {
    margin-bottom: 1.35rem;
}

.learning-theory-drawer__section:last-child {
    margin-bottom: 0;
}

.learning-theory-drawer__h {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 10px;
    color: var(--text-primary);
}

.learning-theory-drawer__p {
    margin: 0 0 10px;
    line-height: 1.65;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.learning-theory-drawer__ul {
    margin: 0;
    padding-left: 1.15rem;
    display: grid;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.55;
}

.learning-theory-drawer__foot {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    padding: 14px 20px 20px;
    border-top: 1px solid rgba(var(--primary-rgb), 0.1);
    background: rgba(255, 255, 255, 0.6);
}

.dark-theme .learning-theory-drawer__panel {
    background: linear-gradient(180deg, var(--dark-surface-elevated) 0%, var(--dark-bg) 100%);
    border-left-color: var(--dark-border);
}

.dark-theme .learning-theory-drawer__title,
.dark-theme .learning-theory-drawer__h {
    color: var(--dark-text);
}

.dark-theme .learning-theory-drawer__p,
.dark-theme .learning-theory-drawer__ul {
    color: var(--dark-text-secondary);
}

.dark-theme .learning-theory-drawer__foot {
    background: rgba(15, 23, 42, 0.85);
}

.dark-theme .learning-theory-drawer__close {
    border-color: var(--dark-border);
    background: rgba(255, 255, 255, 0.06);
    color: var(--dark-text);
}

@media (max-width: 480px) {
    .learning-theory-drawer__panel {
        right: 0;
        left: 0;
        top: auto;
        bottom: 0;
        width: 100%;
        height: min(88vh, 100%);
        border-left: none;
        border-radius: var(--border-radius-xl) var(--border-radius-xl) 0 0;
        transform: translateY(100%);
    }

    .learning-theory-drawer.is-open .learning-theory-drawer__panel {
        transform: translateY(0);
    }
}

.learning-theory ul {
    margin: 0;
    padding-left: 1.1rem;
    display: grid;
    gap: 0.6rem;
}

.learning-quiz {
    display: grid;
    gap: 12px;
    margin-bottom: 12px;
}

.learning-quiz-item {
    border: 1px solid rgba(var(--primary-rgb), 0.16);
    border-radius: 12px;
    padding: 12px;
    background: rgba(var(--primary-rgb), 0.04);
}

.learning-quiz-item h4 {
    margin: 0 0 8px;
    color: var(--text-primary);
}

.learning-options {
    display: grid;
    gap: 8px;
}

.learning-option {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin: 0;
    font-weight: 500;
}

.level-badge,
.level-xp-required,
.level-unlock-bonus {
    color: rgba(255, 255, 255, 0.92);
}

.dark-theme .level-badge,
.dark-theme .level-xp-required,
.dark-theme .level-unlock-bonus,
.dark-theme .level-lock-icon,
body.dark-theme .level-badge,
body.dark-theme .level-xp-required,
body.dark-theme .level-unlock-bonus,
body.dark-theme .level-lock-icon {
    color: #f8fafc !important;
}

.dark-theme .learning-chapter-wrap {
    background: linear-gradient(160deg, rgba(var(--dark-primary-rgb), 0.12), var(--dark-surface));
    border-color: var(--dark-border);
}

.dark-theme .learning-chapter-main strong,
.dark-theme .learning-quiz-item h4 {
    color: var(--dark-text);
}

.dark-theme .learning-chapter-meta,
.dark-theme .learning-chapter-snippet {
    color: var(--dark-text-secondary);
}

.dark-theme .learning-quiz-item {
    background: rgba(var(--dark-primary-rgb), 0.08);
    border-color: var(--dark-border);
}

.prepare-section {
    max-width: 100%;
    margin: 0 auto;
}

.prepare-section h2 {
    color: var(--text-primary);
    margin-bottom: 30px;
}

.dark-theme .prepare-section h2 {
    color: var(--dark-text);
}

/**
 * ������� �������: �� �� ��������� ������, ��� � � FAQ (.faq-preview) ������ .container.
 */
#practiceTab > .surface-card {
    max-width: var(--vb-main-content-max-width);
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    box-sizing: border-box;
}

#prepareTab .prepare-section {
    max-width: var(--vb-main-content-max-width);
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    box-sizing: border-box;
    padding-inline: 0;
}

#prepareTab .prepare-section > .timing-adapt-panel {
    max-width: var(--vb-main-content-max-width);
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    box-sizing: border-box;
}

.btn-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    align-items: stretch;
    position: relative;
    z-index: 2;
}

.btn-row:last-child {
    margin-bottom: 0;
}

.btn-row--wide .btn {
    flex: 1;
    justify-content: center;
}

#prepareTab .surface-card > .button-group {
    --prepare-btn-gap: 8px;
    display: flex;
    flex-direction: column;
    gap: var(--prepare-btn-gap);
    position: relative;
    z-index: 2;
}

/* ���������� / ������ ������: ��������� ���������� ��� .btn::before (���� + ��������� > ��������) */
#prepareTab #improveBtn,
#prepareTab #simplifyBtn {
    overflow: hidden;
    will-change: auto;
}

#prepareTab #improveBtn::before,
#prepareTab #simplifyBtn::before {
    display: none !important;
    content: none !important;
}

/* ������: ��������� ����� .surface-card::before (��������� ���� �� �����) � ������ scale/hover-shift */
#prepareTab .surface-card {
    position: relative;
    z-index: 0;
}

#prepareTab .surface-card::before,
#prepareTab .surface-card:hover::before {
    display: none !important;
    content: none !important;
}

#prepareTab .surface-card:hover {
    transform: none;
    box-shadow: var(--shadow-lg);
}

/* ������: ������ ����� � ���������� ���������� � ����� ������������ ������� �� ���� ����� */
#prepareTab .surface-card .btn-row {
    display: grid;
    gap: var(--prepare-btn-gap, 10px);
    margin-bottom: 0;
    align-items: stretch;
}

#prepareTab .surface-card .btn-row > .btn {
    width: 100%;
    min-width: 0;
    max-width: none;
    margin: 0 !important;
    box-sizing: border-box;
}

#prepareTab .surface-card .btn-row:not(.btn-row--wide) > .btn:not(.btn-small) {
    padding: 10px 14px;
    font-size: 0.9375rem;
}

#prepareTab .surface-card .btn-row:not(.btn-row--wide):has(> .btn:nth-child(2):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

#prepareTab .surface-card .btn-row:not(.btn-row--wide):has(> .btn:nth-child(3):last-child) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

#prepareTab .surface-card .btn-row:not(.btn-row--wide):has(> .btn:nth-child(4):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 900px) {
    /* ��: ���� ������ ������� ��� ���� ����� � ���� �������� / ����� / ������� / � �������� ��������� */
    #prepareTab .surface-card > .button-group {
        --prepare-btn-gap: 10px;
        max-width: min(44rem, 100%);
        margin-left: auto;
        margin-right: auto;
        width: 100%;
        box-sizing: border-box;
    }

    #prepareTab .surface-card .btn-row:not(.btn-row--wide):has(> .btn:only-child) {
        justify-items: stretch;
    }

    #prepareTab .surface-card .btn-row:not(.btn-row--wide):has(> .btn:only-child) > .btn {
        width: 100%;
        max-width: none;
    }
}

@media (max-width: 480px) {
    /* �������� �������� � ���� � �������; ������ � ����� 2?2 (���������� � ��� �� �� �� ����������) */
    #prepareTab .surface-card .btn-row:not(.btn-row--wide):has(> .btn:nth-child(2):last-child),
    #prepareTab .surface-card .btn-row:not(.btn-row--wide):has(> .btn:nth-child(3):last-child) {
        grid-template-columns: minmax(0, 1fr);
    }
    #prepareTab .surface-card .btn-row:not(.btn-row--wide):has(> .btn:nth-child(4):last-child) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

#prepareTab .surface-card .btn-row--wide {
    grid-template-columns: minmax(0, 1fr);
}

#prepareTab .surface-card .btn-row--wide > .btn {
    width: 100%;
    justify-self: stretch;
}

@media (max-width: 899px) {
    #prepareTab .surface-card .btn-row:not(.btn-row--wide):has(> .btn:only-child) {
        grid-template-columns: minmax(0, 1fr);
        justify-items: center;
    }

    #prepareTab .surface-card .btn-row:not(.btn-row--wide):has(> .btn:only-child) > .btn {
        width: min(460px, 100%);
    }
}

.timing-adapt-panel {
    max-width: var(--vb-main-content-max-width);
    margin: 2rem auto;
    padding: 0;
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    background: linear-gradient(160deg, rgba(var(--primary-rgb), 0.09), rgba(var(--secondary-rgb), 0.04));
    box-shadow: var(--shadow-sm);
    animation: fadeInUp 0.55s ease-out both;
    overflow: hidden;
}

.timing-adapt-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 1.5rem 1.75rem 1rem;
}

.timing-adapt-icon {
    font-size: 2rem;
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(var(--primary-rgb), 0.15), rgba(var(--primary-rgb), 0.05));
    border-radius: var(--border-radius);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
}

.timing-adapt-text {
    flex: 1;
    min-width: 0;
}

.timing-adapt-title {
    margin: 0 0 0.35rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}

.timing-adapt-hint {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.timing-adapt-body {
    padding: 0 1.75rem 1rem;
}

.timing-adapt-footer {
    padding: 1rem 1.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 16px;
}

.timing-adapt-footer .btn {
    flex-shrink: 0;
    width: auto;
    min-width: 0;
}

.timing-adapt-footer .timing-adapt-status {
    flex: 1;
    margin: 0;
}

.dark-theme .timing-adapt-panel {
    border-color: var(--dark-border);
    background: linear-gradient(160deg, rgba(var(--dark-primary-rgb), 0.1), transparent);
}

.dark-theme .timing-adapt-icon {
    background: linear-gradient(145deg, rgba(var(--dark-primary-rgb), 0.15), rgba(var(--dark-primary-rgb), 0.05));
    border-color: rgba(var(--dark-primary-rgb), 0.2);
}

.timing-adapt-title {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}

.dark-theme .timing-adapt-title {
    color: var(--dark-text);
}

.timing-adapt-ico {
    font-size: 1.35rem;
}

.timing-adapt-hint {
    margin: 0 0 1.1rem;
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--text-secondary);
}

.dark-theme .timing-adapt-hint {
    color: var(--dark-text-secondary);
}

.timing-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.timing-chip {
    padding: 10px 20px;
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    background: linear-gradient(145deg, #ffffff, #f0f4ff);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    font-family: var(--font-primary);
    flex: 0 0 auto;
    min-width: 90px;
    text-align: center;
}

.timing-chip:hover {
    background: linear-gradient(145deg, #ffffff, #e8f0ff);
    transform: translateY(-3px);
    box-shadow: var(--shadow-clay);
    border-color: var(--primary-color);
}

.timing-chip-active {
    background: linear-gradient(145deg, #3b82f6, #2563eb);
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow-clay);
}

.dark-theme .timing-chip {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    color: var(--dark-text);
    border-color: var(--dark-border);
    box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.2), -4px -4px 8px rgba(255, 255, 255, 0.05);
}

.dark-theme .timing-chip:hover {
    border-color: var(--dark-primary);
}

.dark-theme .timing-chip-active {
    color: white;
}

.timing-range-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 0;
}

.timing-range-label {
    display: flex;
    align-items: baseline;
    gap: 4px;
    flex-shrink: 0;
    min-width: 80px;
}

.timing-range-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
    font-family: 'Montserrat', sans-serif;
}

.dark-theme .timing-range-value {
    color: var(--dark-primary);
}

.timing-range-unit {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.dark-theme .timing-range-unit {
    color: var(--dark-text-secondary);
}

.timing-range-row input[type="range"] {
    flex: 1;
    min-width: 0;
    max-width: 100%;
    accent-color: var(--primary-color);
    height: 8px;
}

.timing-adapt-actions {
    margin-top: 0.5rem;
}

.timing-adapt-status {
    min-height: 1.25rem;
    margin: 0.75rem 0 0;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.dark-theme .timing-adapt-status {
    color: var(--dark-text-secondary);
}

.adaptation-notes {
    padding: 14px 16px;
    border-radius: var(--border-radius);
    background: rgba(var(--primary-rgb), 0.08);
    border-left: 4px solid var(--accent-color);
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.dark-theme .adaptation-notes {
    background: rgba(var(--dark-primary-rgb), 0.12);
    color: var(--dark-text);
}

.adaptation-notes.hidden {
    display: none;
}

.speech-output-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 14px;
    letter-spacing: 0.01em;
    font-family: var(--font-primary);
}

.dark-theme .form-group label {
    color: var(--dark-text);
}

/* === AIRY FORM INPUTS === */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 14px 18px;
    border: 1.5px solid rgba(59, 130, 246, 0.12);
    border-radius: var(--border-radius-lg);
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(8px);
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 15px;
    transition: var(--transition);
    will-change: border-color, box-shadow, background;
}

input:hover,
textarea:hover,
select:hover {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(59, 130, 246, 0.2);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1), var(--shadow-sm);
    background: rgba(255, 255, 255, 0.98);
}

.dark-theme input,
.dark-theme textarea,
.dark-theme select {
    background: rgba(20, 32, 55, 0.72);
    backdrop-filter: blur(8px);
    border-color: rgba(71, 85, 105, 0.25);
    color: var(--dark-text);
}

.dark-theme input:hover,
.dark-theme textarea:hover,
.dark-theme select:hover {
    background: rgba(25, 40, 65, 0.82);
    border-color: rgba(96, 165, 250, 0.25);
}

.dark-theme input:focus,
.dark-theme textarea:focus,
.dark-theme select:focus {
    border-color: var(--dark-primary);
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.1), var(--shadow-sm);
}

textarea {
    min-height: 140px;
    resize: vertical;
    border-radius: var(--border-radius-xl);
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7fa8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 42px;
}

.button-group {
    display: flex;
    gap: 12px;
    margin: 24px 0;
    flex-wrap: wrap;
}

.generated-speech {
    margin-top: 32px;
    padding: 24px;
    background: linear-gradient(145deg, #ffffff, #f5f8ff);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-clay);
    border: 1px solid rgba(255, 255, 255, 0.9);
}

.generated-speech.hidden {
    display: none;
}

.generated-speech h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.speech-output {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    white-space: pre-wrap;
    line-height: 1.6;
    color: #333;
}

/* Mobile-first responsive design */
@media (max-width: 480px) {
    .nav-container {
        flex-direction: column;
        gap: 15px;
        padding: 10px;
    }
    
    .nav-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .nav-btn {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .container {
        padding: 15px;
        margin: 10px;
        border-radius: 15px;
    }
    
    .hero-section h1 {
        font-size: 1.8em;
    }
    
    .subtitle {
        font-size: 1em;
    }
    
    .stats-bar {
        grid-template-columns: repeat(2, minmax(0, 240px));
        justify-content: center;
        gap: 14px;
        max-width: min(100%, 520px);
    }
    
    .stat {
        padding: 15px;
    }
    
    .tab {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 16px;
        margin: 5px 0;
        width: 100%;
    }
    
    .button-group {
        flex-direction: column;
        width: 100%;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .modal-content {
        width: 95%;
        margin: 15% auto;
        padding: 15px;
        border-radius: 15px;
    }
    
    .verification-box {
        padding: 20px;
        margin: 15px;
    }
    
    .auth-tab {
        padding: 12px;
        font-size: 14px;
    }
    
    .verification-btn {
        padding: 12px 24px;
        font-size: 15px;
        min-height: 44px;
    }
    
    /* ��������� touch-���������� ��� ��������� ��������� */
    .btn,
    .nav-btn,
    .auth-btn,
    .verification-btn {
        -webkit-tap-highlight-color: rgba(var(--primary-rgb), 0.3);
        touch-action: manipulation;
    }
    
    .btn {
        min-height: 44px;
    }
    
    .nav-btn {
        min-height: 44px;
    }
    
    /* ���������� ���� ������� ��� ��������� ������ */
    .btn-small {
        padding: 10px 16px;
        min-height: 36px;
    }
}

@media (max-width: 360px) {
    .modal-content {
        margin: 10% auto;
        padding: 12px;
        border-radius: 12px;
        width: 98%;
    }
    
    .verification-box {
        padding: 15px;
        margin: 10px;
    }
    
    .auth-tab {
        padding: 10px;
        font-size: 13px;
    }
    
    .verification-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .nav-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .btn {
        padding: 10px 18px;
        font-size: 14px;
    }
    
    .stats-bar {
        grid-template-columns: repeat(2, minmax(0, min(46vw, 220px)));
        justify-content: center;
        gap: 12px;
        max-width: 100%;
    }
    
    .stat {
        padding: 16px 14px;
    }
    
    /* ��������� touch-���������� ��� ����� ��������� ������� */
    .btn,
    .nav-btn,
    .auth-btn,
    .verification-btn {
        min-height: 44px;
        -webkit-tap-highlight-color: rgba(var(--primary-rgb), 0.3);
        touch-action: manipulation;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .nav-container {
        padding: 0 15px;
    }
    
    .nav-btn {
        padding: 10px 18px;
    }
    
    .stats-bar {
        grid-template-columns: repeat(2, minmax(0, min(42vw, 260px)));
        justify-content: center;
        gap: 16px;
        max-width: min(100%, 580px);
    }
    
    .tab {
        padding: 12px 20px;
        font-size: 15px;
    }
    
    .btn {
        padding: 14px 24px;
        font-size: 16px;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-summary {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .summary-card {
        padding: 14px 10px;
    }
    
    .summary-value {
        font-size: 1.2rem;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .chart-card {
        padding: 18px;
    }
    
    .chart-wrap {
        min-height: 220px;
    }
    
    .chart-wrap canvas {
        max-height: 250px;
    }

    #analysis .chart-wrap canvas {
        max-height: none !important;
        height: auto !important;
    }

    /* ����� vbResultStagger ����� �������� �������� � opacity:0 (�������� �� ���������) */
    .analysis.is-visible .chart-card {
        opacity: 1 !important;
        animation: none !important;
        transform: none !important;
    }
    
    .structure-items {
        grid-template-columns: 1fr;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .charts-section {
        padding: 15px;
    }
    
    .modal-content {
        margin: 20% auto;
        width: 95%;
        padding: 20px;
    }
    
    .verification-box {
        padding: 25px;
        margin: 20px;
    }
    
    .verification-icon {
        font-size: 3em;
    }
    
    /* ��������� touch-���������� ��� ��������� */
    .btn,
    .nav-btn,
    .auth-btn,
    .verification-btn {
        -webkit-tap-highlight-color: rgba(var(--primary-rgb), 0.3);
        touch-action: manipulation;
    }
}

/* Exams & Challenges sections style improvements - claymorphism for new content */
.exams-section, .challenges-section {
    max-width: var(--vb-main-content-max-width);
    margin: 0 auto;
    padding: 20px;
    border-radius: var(--border-radius);
    background: linear-gradient(145deg, #ffffff, #f4faff);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 95%;
    }
    
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* === AIRY GLASSMORPHISM MODALS === */
.modal {
    display: none;
    position: fixed;
    z-index: 5000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(16px) saturate(125%);
    -webkit-backdrop-filter: blur(16px) saturate(125%);
    animation: modalFadeIn 0.35s ease-out;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.modal[style*="flex"] {
    display: flex !important;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-30px) scale(0.94); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-content {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    margin: auto;
    padding: 40px;
    border-radius: var(--border-radius-2xl);
    border: 1px solid rgba(255, 255, 255, 0.95);
    width: 90%;
    max-width: 440px;
    box-shadow: var(--shadow-2xl);
    position: relative;
    animation: slideIn 0.5s cubic-bezier(0.34, 1.2, 0.64, 1);
}

#paymentModal {
    overflow: hidden;
}

.payment-modal-content {
    max-width: 560px;
    max-height: min(88vh, 760px);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-width: none;
}

.payment-modal-content::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.dark-theme .modal-content {
    background: rgba(15, 25, 48, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--dark-text);
    border-color: rgba(71, 85, 105, 0.3);
    box-shadow: var(--shadow-2xl), inset 0 1px 0 rgba(255,255,255,0.06);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.dark-theme .close {
    color: var(--dark-text-secondary);
}

.close:hover {
    color: var(--danger-color);
    background: rgba(var(--danger-color-rgb), 0.1);
}

.dark-theme .close:hover {
    background: rgba(var(--danger-color-rgb), 0.2);
}

.auth-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.dark-theme .auth-tabs {
    border-bottom-color: var(--dark-border);
}

.auth-tab {
    flex: 1;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: var(--transition);
    font-weight: 600;
    color: var(--text-secondary);
}

.dark-theme .auth-tab {
    color: var(--dark-text-secondary);
}

.auth-tab:hover {
    color: var(--primary-color);
    background: rgba(var(--primary-rgb), 0.05);
}

.dark-theme .auth-tab:hover {
    color: var(--dark-primary);
    background: rgba(var(--dark-primary-rgb), 0.1);
}

.auth-tab.active {
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
}

.dark-theme .auth-tab.active {
    border-bottom-color: var(--dark-primary);
    color: var(--dark-primary);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: fadeInUp 0.5s ease-out;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.dark-theme .form-group label {
    color: var(--dark-text);
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: var(--transition);
    background: white;
    font-family: inherit;
}

.dark-theme .form-group input {
    border-color: var(--dark-border);
    background: var(--dark-surface);
    color: var(--dark-text);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.dark-theme .form-group input:focus {
    border-color: var(--dark-primary);
    box-shadow: 0 0 0 3px rgba(var(--dark-primary-rgb), 0.2);
}

.auth-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(145deg, #3b82f6, #2563eb);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-clay);
    font-family: var(--font-primary);
}

.dark-theme .auth-btn {
    background: linear-gradient(145deg, #60A5FA, #3B82F6);
}

.auth-btn:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-clay-hover);
}

.auth-btn:active {
    transform: translateY(-1px);
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    color: var(--text-secondary);
}

.dark-theme .auth-switch {
    color: var(--dark-text-secondary);
}

.auth-switch a {
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.dark-theme .auth-switch a {
    color: var(--dark-primary);
}

.auth-switch a:hover {
    color: var(--secondary-color);
}

.dark-theme .auth-switch a:hover {
    color: var(--dark-secondary);
}

.auth-social-block {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.24);
}

.auth-social-title {
    margin: 0 0 10px;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.auth-social-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.auth-social-grid--single {
    grid-template-columns: 1fr;
    max-width: 280px;
    margin: 0 auto;
}

.auth-forgot-line {
    margin: 0 0 12px;
    font-size: 0.92rem;
}

a.auth-inline-link {
    color: var(--primary-color);
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
}

a.auth-inline-link:hover {
    text-decoration: underline;
}

.dark-theme a.auth-inline-link {
    color: var(--dark-primary);
}

.exam-speak-btn {
    margin-top: 12px;
}

.social-auth-btn {
    min-height: 48px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(255, 255, 255, 0.92);
    color: var(--text-primary);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.social-auth-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.social-auth-btn:disabled {
    opacity: 0.48;
    cursor: not-allowed;
}

.social-auth-btn--google { color: #1a73e8; }
.social-auth-btn--vk { color: #0077ff; }
.social-auth-btn--yandex { color: #fc3f1d; }

.auth-social-note,
.verification-copy,
.verification-status,
.analysis-legal-note,
.legal-voice-note {
    color: var(--text-secondary);
    font-size: 0.94rem;
    line-height: 1.5;
}

.auth-social-note {
    margin: 10px 0 0;
}

.legal-voice-note {
    margin: 12px 0 0;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.14);
}

.verification-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.verification-status {
    min-height: 1.4em;
    margin-top: 12px;
}

.verification-status--success {
    color: #16a34a;
}

.verification-status--error {
    color: #dc2626;
}

.verification-status--info {
    color: var(--primary-color);
}

.analysis-legal-note {
    margin-top: 12px;
}

.admin-modal-wide {
    width: min(1380px, 98vw);
    max-height: min(94vh, 960px);
    overflow: auto;
}

.modal-content.admin-modal-wide {
    max-width: min(1380px, 98vw);
    padding: clamp(18px, 2.8vw, 32px);
    scrollbar-gutter: stable;
}

.admin-panel {
    padding-top: 8px;
}

.admin-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    padding-bottom: 18px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.admin-panel__title {
    margin: 0 0 6px;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.admin-panel__toolbar {
    align-items: center;
}

.admin-range-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-right: 4px;
}

.admin-section {
    margin-bottom: 28px;
}

.admin-section:last-child {
    margin-bottom: 8px;
}

.admin-section__title {
    margin: 0 0 14px;
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--text-primary);
}

.admin-section__title--inline {
    margin-bottom: 0;
}

.admin-section--chart {
    padding: 16px 0 4px;
}

.admin-reviews-toolbar {
    align-items: flex-end;
}

.admin-reviews-stack {
    min-height: 100px;
    max-height: min(70vh, 760px);
    overflow: auto;
    padding: 10px;
    margin-top: 8px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(248, 250, 255, 0.55);
}

.dark-theme .admin-reviews-stack {
    background: rgba(15, 23, 42, 0.4);
    border-color: rgba(71, 85, 105, 0.5);
}

.admin-reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 14px;
}

.admin-review-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 2px 14px rgba(15, 23, 42, 0.06);
}

.dark-theme .admin-review-card {
    background: rgba(22, 32, 58, 0.92);
    border-color: rgba(71, 85, 105, 0.5);
    box-shadow: 0 4px 22px rgba(0, 0, 0, 0.18);
}

.admin-review-card__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.admin-review-card__stars {
    color: #d97706;
    letter-spacing: 0.04em;
    font-weight: 600;
}

.admin-review-card__when {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.admin-review-card__meta {
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.admin-review-card__text {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--text-primary);
    white-space: pre-wrap;
}

.admin-review-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.admin-review-action--danger {
    border-color: rgba(220, 38, 38, 0.32) !important;
    color: #b91c1c !important;
}

.dark-theme .admin-review-card__text {
    color: var(--dark-text);
}

.dark-theme .admin-review-card__meta {
    color: var(--dark-text-secondary);
}

.admin-modal-head,
.admin-users-toolbar,
.admin-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-modal-subtitle {
    margin: 4px 0 0;
    color: var(--text-secondary);
}

.admin-controls select,
.admin-users-toolbar input {
    min-height: 42px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(255, 255, 255, 0.94);
    color: var(--text-primary);
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
    margin: 0 0 8px;
}

.admin-stat-card,
.admin-trend-item,
.admin-user-row {
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 255, 0.88) 100%);
    padding: 14px 16px;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
}

.admin-user-search {
    min-width: min(240px, 100%);
}

.admin-stat-card strong,
.admin-user-email {
    display: block;
    color: var(--text-primary);
}

.admin-stat-card span,
.admin-user-meta {
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.admin-trend-list,
.admin-users-table {
    display: grid;
    gap: 12px;
}

.admin-user-row {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, auto);
    gap: 12px;
    align-items: start;
}

.admin-user-row > * {
    min-width: 0;
}

.admin-user-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

@media (max-width: 1024px) {
    .admin-user-row {
        grid-template-columns: 1fr;
    }

    .admin-user-pills {
        justify-content: flex-start;
    }

    .admin-user-actions {
        justify-content: flex-start;
    }
}

.admin-user-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.admin-user-action--danger {
    border-color: rgba(220, 38, 38, 0.22);
    color: #b91c1c;
}

.admin-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.82rem;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
}

.dark-theme .auth-social-title,
.dark-theme .auth-social-note,
.dark-theme .verification-copy,
.dark-theme .verification-status,
.dark-theme .analysis-legal-note,
.dark-theme .admin-modal-subtitle,
.dark-theme .admin-stat-card span,
.dark-theme .admin-user-meta,
.dark-theme .legal-voice-note {
    color: var(--dark-text-secondary);
}

.dark-theme .social-auth-btn,
.dark-theme .admin-stat-card,
.dark-theme .admin-trend-item,
.dark-theme .admin-user-row {
    background: linear-gradient(165deg, rgba(22, 32, 58, 0.96) 0%, rgba(15, 23, 42, 0.92) 100%);
    border-color: rgba(71, 85, 105, 0.45);
    color: var(--dark-text);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.dark-theme .admin-panel__header {
    border-bottom-color: rgba(71, 85, 105, 0.45);
}

.dark-theme .admin-panel__title,
.dark-theme .admin-section__title {
    color: var(--dark-text);
}

.dark-theme .legal-voice-note {
    background: rgba(59, 130, 246, 0.12);
}

.dark-theme .admin-controls select,
.dark-theme .admin-users-toolbar input {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(71, 85, 105, 0.4);
    color: var(--dark-text);
}

@media (max-width: 768px) {
    .auth-social-grid {
        grid-template-columns: 1fr;
    }

    .verification-actions {
        flex-direction: column;
    }

    .admin-user-row {
        grid-template-columns: 1fr;
    }

    .admin-user-actions {
        justify-content: flex-start;
    }

    .tab-lock-overlay {
        padding: 16px;
    }

    .tab-lock-card {
        padding: 18px 16px;
    }
}

.admin-payments-tbl {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}
.admin-payments-tbl th,
.admin-payments-tbl td {
    border: 1px solid rgba(15, 23, 42, 0.1);
    padding: 6px 8px;
    text-align: left;
    vertical-align: top;
}
.admin-payments-tbl th {
    background: rgba(37, 99, 235, 0.08);
    font-weight: 600;
}
.admin-payment-meta code {
    font-size: 0.8rem;
    word-break: break-word;
}

.admin-promo-create {
    margin-bottom: 14px;
}
.admin-promo-create-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: 10px 14px;
    margin-bottom: 10px;
}
.admin-promo-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
}
.admin-promo-field--wide {
    grid-column: 1 / -1;
}
.admin-promo-create-actions {
    margin-bottom: 6px;
}
.admin-promo-create-status {
    margin-top: 6px;
    min-height: 1.25em;
}

.admin-usage-hint {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin: 0 0 12px;
    line-height: 1.5;
}
.admin-subheading {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 16px 0 8px;
    color: var(--text-primary);
}
.admin-usage-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.admin-usage-pill {
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: var(--border-radius-full);
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.18);
}
.admin-usage-table-wrap {
    overflow-x: auto;
    margin-bottom: 8px;
    max-width: 100%;
}
.admin-usage-tbl {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    font-size: 0.82rem;
}
.admin-usage-tbl th,
.admin-usage-tbl td {
    border: 1px solid rgba(15, 23, 42, 0.1);
    padding: 6px 8px;
    text-align: left;
    vertical-align: top;
}
.admin-usage-tbl th {
    background: rgba(37, 99, 235, 0.08);
    font-weight: 600;
    white-space: nowrap;
}
.admin-usage-scenario {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.35;
}
body.dark-theme .admin-usage-hint {
    color: var(--text-muted, #94a3b8);
}
body.dark-theme .admin-usage-pill {
    background: rgba(96, 165, 250, 0.12);
    border-color: rgba(96, 165, 250, 0.22);
}
body.dark-theme .admin-usage-tbl th,
body.dark-theme .admin-usage-tbl td {
    border-color: rgba(148, 163, 184, 0.2);
}
body.dark-theme .admin-usage-tbl th {
    background: rgba(30, 41, 59, 0.9);
}

.exam-answer-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    align-items: center;
}
.exam-voice-hint,
.exam-voice-status {
    font-size: 0.9rem;
    margin: 0 0 8px;
}
.scoring-note {
    font-size: 0.9rem;
    color: #64748b;
    margin-top: 8px;
}
body.dark-theme .scoring-note {
    color: #94a3b8;
}
.profile-subscription-actions {
    margin: 16px 0 18px;
    padding: 16px;
    border-radius: var(--border-radius-xl);
    border: 1px solid rgba(var(--primary-rgb), 0.18);
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.08), rgba(var(--secondary-rgb), 0.06));
}
.profile-cancel-hint {
    font-size: 0.88rem;
    color: #64748b;
    margin: 12px 0 0;
    line-height: 1.45;
}
body.dark-theme .profile-cancel-hint {
    color: #94a3b8;
}
body.dark-theme .profile-subscription-actions {
    border-color: rgba(96, 165, 250, 0.22);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(124, 58, 237, 0.1));
}

/* === AIRY VERIFICATION OVERLAY === */
.verification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(240, 245, 255, 0.88);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.6s ease-out;
}

.dark-theme .verification-overlay {
    background: rgba(8, 12, 24, 0.88);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
}

/* === LEGAL CONSENT GATE (OAuth / �����) === */
.legal-consent-gate-overlay {
    position: fixed;
    inset: 0;
    z-index: 2050;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 24px 16px;
    overflow-y: auto;
    background: rgba(240, 245, 255, 0.92);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
}

.legal-consent-gate-overlay.hidden {
    display: none !important;
}

.dark-theme .legal-consent-gate-overlay {
    background: rgba(8, 12, 24, 0.92);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
}

.legal-consent-gate-box {
    width: 100%;
    max-width: 520px;
    margin: auto;
    padding: 28px 24px 32px;
    border-radius: var(--border-radius-xl);
    background: linear-gradient(145deg, #ffffff, #f5f8ff);
    border: 1px solid rgba(59, 130, 246, 0.16);
    box-shadow: var(--shadow-lg);
}

.dark-theme .legal-consent-gate-box {
    background: var(--dark-surface);
    border-color: rgba(96, 165, 250, 0.25);
}

.legal-consent-gate-box h2 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #1e40af;
}

.dark-theme .legal-consent-gate-box h2 {
    color: #bfdbfe;
}

.legal-consent-gate-lead {
    font-size: 0.9rem;
    line-height: 1.55;
    color: #475569;
    margin-bottom: 16px;
}

.dark-theme .legal-consent-gate-lead {
    color: #cbd5e1;
}

.consent-group--gate {
    margin-bottom: 14px;
}

.consent-row--optional span {
    font-weight: 500;
}

.legal-consent-gate-submit {
    width: 100%;
    margin-top: 6px;
}

.verification-box {
    background: linear-gradient(145deg, #ffffff, #f5f8ff);
    padding: 48px;
    border-radius: var(--border-radius-xl);
    text-align: center;
    box-shadow: var(--shadow-clay);
    max-width: 520px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    animation: scaleIn 0.5s ease-out;
}

.dark-theme .verification-box {
    background: var(--dark-surface);
    border-color: var(--dark-border);
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.verification-icon {
    font-size: 4em;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.verification-btn {
    background: linear-gradient(145deg, #3b82f6, #2563eb);
    color: white;
    padding: 16px 32px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 24px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-clay);
    font-family: var(--font-primary);
}

.dark-theme .verification-btn {
    background: linear-gradient(145deg, #60A5FA, #3B82F6);
}

.verification-btn:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-clay-hover);
}

/* Profile modal styles */
.profile-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin: 8px 0 16px;
}

.profile-kicker {
    margin: 0 0 6px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary-color);
}

.profile-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
}

.profile-info {
    margin: 20px 0;
    padding: 15px;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.1), rgba(var(--secondary-rgb), 0.1));
    border-radius: var(--border-radius-xl);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
}

.profile-info p {
    margin: 0;
    padding: 12px 14px;
    background: white;
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    min-height: 0;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.profile-info strong {
    color: var(--dark-color);
    font-weight: 600;
}

.profile-info span {
    color: var(--text-secondary);
    font-weight: 500;
    word-break: break-word;
}

.profile-actions {
    display: flex;
    gap: 15px;
    margin-top: 18px;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.profile-actions .btn {
    min-width: 160px;
    flex: 1 1 180px;
    padding: 12px 24px;
    font-size: 15px;
}

/* Mobile responsiveness for profile modal */
@media (max-width: 480px) {
    .profile-info {
        grid-template-columns: 1fr;
    }

    .profile-info p {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        min-height: unset;
    }
    
    .profile-info span {
        align-self: flex-start;
    }
    
    .profile-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .profile-actions .btn {
        width: 100%;
        min-width: unset;
    }
}

@media (max-width: 600px) {
    .profile-info {
        grid-template-columns: 1fr;
    }
}

/* ==================== EXAMS & CHALLENGES ==================== */
.exams-section, .challenges-section {
    max-width: var(--vb-main-content-max-width);
    margin: 0 auto;
}

.exam-settings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.exam-start-section {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.exam-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.38);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.exam-loading-overlay.hidden {
    display: none;
}

.exam-loading-panel {
    max-width: 400px;
    text-align: center;
    padding: 28px 24px;
    border-radius: var(--border-radius-lg);
    background: var(--surface-color, rgba(255, 255, 255, 0.98));
    border: 1px solid var(--border-color, rgba(37, 99, 235, 0.18));
    box-shadow: var(--shadow-lg, 0 20px 50px rgba(0, 0, 0, 0.15));
}

.exam-loading-panel .loading-spinner {
    margin: 0 auto 16px;
}

.exam-loading-title {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-primary);
    margin: 0 0 8px;
    line-height: 1.4;
}

.exam-loading-hint {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.45;
}

body.exam-loading-active {
    overflow: hidden;
}

.dark-theme .exam-loading-panel {
    background: rgba(30, 41, 59, 0.96);
    border-color: rgba(71, 85, 105, 0.35);
}

.exam-session {
    padding: 28px;
    margin-top: 24px;
    text-align: center;
}

.exam-progress {
    margin-bottom: 20px;
}

.exam-progress-text {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-weight: 600;
}

.exam-progress-bar {
    height: 10px;
    background: linear-gradient(145deg, #e8ecf4, #ffffff);
    border-radius: 999px;
    overflow: hidden;
    box-shadow: inset 2px 2px 4px rgba(0,0,0,0.1);
}

.exam-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    border-radius: 999px;
    transition: width 0.5s ease;
}

.exam-timer-section {
    margin: 24px 0;
    padding: 20px;
    background: linear-gradient(145deg, #ffffff, #f0f4ff);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-clay);
    display: inline-block;
    min-width: 140px;
}

.exam-timer-label {
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    margin-bottom: 8px;
}

.exam-timer {
    font-size: 48px;
    font-weight: 800;
    color: var(--primary-color);
    font-family: var(--font-display);
}

.exam-timer.timer-warning {
    color: var(--danger-color);
    animation: pulse 1s infinite;
}

.exam-question-box {
    padding: 28px;
    margin: 24px 0;
    background: linear-gradient(145deg, #ffffff, #f8faff);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-clay);
    border: 1px solid rgba(59, 130, 246, 0.15);
}

.exam-question-box h3 {
    font-size: 20px;
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.5;
}

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

.exam-answer-section {
    margin-top: 20px;
}

.exam-answer-section textarea {
    width: 100%;
    min-height: 120px;
    margin-bottom: 16px;
}

.exam-results {
    text-align: center;
}

.exam-results h2 {
    margin-bottom: 24px;
    color: var(--text-primary);
}

.exam-score-circle {
    margin: 0 auto 28px;
    display: inline-block;
}

.exam-score-svg .exam-score-ring-bg {
    stroke: var(--border-color);
}

.exam-score-svg .exam-score-ring-fill {
    stroke: var(--primary-color);
    stroke-linecap: round;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.exam-score-svg .exam-score-text {
    fill: var(--text-primary);
}

.exam-score-label {
    margin-top: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.exam-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.exam-stat-item {
    text-align: center;
    padding: 16px 24px;
    background: linear-gradient(145deg, #ffffff, #f0f4ff);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.exam-stat-value {
    display: block;
    font-size: 28px;
    font-weight: 800;
    color: var(--primary-color);
}

.exam-stat-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.exam-answers-review {
    text-align: left;
    margin-bottom: 24px;
    max-height: 300px;
    overflow-y: auto;
}

.exam-answer-review-item {
    padding: 16px;
    margin-bottom: 12px;
    background: linear-gradient(145deg, #ffffff, #f8faff);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

.exam-answer-review-item.skipped {
    opacity: 0.6;
    border-left-color: var(--warning-color);
}

.exam-review-q {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.exam-review-a {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Challenges */
.challenges-stats-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.challenge-stat {
    padding: 24px;
    background: linear-gradient(145deg, #ffffff, #f0f4ff);
    border-radius: var(--border-radius-lg);
    text-align: center;
    box-shadow: var(--shadow-clay);
}

.challenge-stat-number {
    font-size: 36px;
    font-weight: 800;
    color: var(--primary-color);
    font-family: var(--font-display);
}

.challenge-stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.today-challenge {
    text-align: center;
    padding: 32px;
}

.challenge-badge {
    display: inline-block;
    padding: 8px 16px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
}

.today-challenge h3 {
    font-size: 24px;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.challenge-desc {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 15px;
}

.challenge-progress-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    justify-content: center;
}

.challenge-progress-bar {
    flex: 1;
    max-width: 300px;
    height: 12px;
    background: linear-gradient(145deg, #e8ecf4, #ffffff);
    border-radius: 999px;
    overflow: hidden;
    box-shadow: inset 2px 2px 4px rgba(0,0,0,0.08);
}

.challenge-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    border-radius: 999px;
    transition: width 0.5s ease;
}

.challenges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.challenge-card {
    padding: 24px;
    background: linear-gradient(145deg, #ffffff, #f8faff);
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(59, 130, 246, 0.15);
    box-shadow: var(--shadow-clay);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.challenge-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-clay-hover);
}

.challenge-card.completed {
    border-color: rgba(22, 163, 74, 0.3);
    background: linear-gradient(145deg, #f0fdf4, #ffffff);
}

.challenge-card.today {
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: var(--shadow-clay-hover);
}

.challenge-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.challenge-card-points {
    padding: 4px 12px;
    background: linear-gradient(135deg, #fef3c7, #fcd34d);
    color: #92400e;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.challenge-card-done {
    color: var(--success-color);
    font-size: 20px;
}

.challenge-card h4 {
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 17px;
}

.challenge-card p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 12px;
    line-height: 1.5;
}

.challenge-card-type {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.challenges-history h3 {
    color: var(--text-primary);
    margin-bottom: 16px;
    font-size: 18px;
}

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

.history-date-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    background: linear-gradient(145deg, #ffffff, #f8faff);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.history-date {
    color: var(--text-primary);
    font-weight: 600;
}

.history-count {
    color: var(--text-secondary);
}

.no-history {
    color: var(--text-secondary);
    text-align: center;
    padding: 20px;
}
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(var(--primary-rgb), 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0);
    }
}

@keyframes pulse-danger {
    0% {
        box-shadow: 0 0 0 0 rgba(var(--danger-color-rgb), 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(var(--danger-color-rgb), 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(var(--danger-color-rgb), 0);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes wave {
    0%, 100% {
        transform: scaleY(0.3);
    }
    50% {
        transform: scaleY(1);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

@keyframes progress-loading {
    0% {
        width: 0%;
        opacity: 1;
    }
    50% {
        width: 70%;
        opacity: 0.8;
    }
    100% {
        width: 100%;
        opacity: 1;
    }
}

/* �������� ��� ��������� ���������� */
.btn-primary.recording {
    animation: pulse 1.5s infinite;
    position: relative;
}

.btn-danger.recording {
    animation: recordingBtnSoftGlow 2.2s ease-in-out infinite;
}

/* ��������� ������: ������ � ����� � ���� �����; ������ �� �������� ���������� */
.status.recording {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: nowrap;
}

.recording-live-text {
    flex: 0 1 auto;
    line-height: 1.35;
    text-align: center;
}

.recording-live-indicator {
    display: block;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    position: relative;
    overflow: visible;
}

.recording-live-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(145deg, #f87171, #dc2626);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.55);
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 1;
    animation: recordingDotBreathe 2s ease-in-out infinite;
}

.recording-live-indicator::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 14px;
    height: 14px;
    margin: 0;
    border-radius: 50%;
    border: 2px solid rgba(239, 68, 68, 0.5);
    transform: translate(-50%, -50%) scale(0.85);
    transform-origin: center center;
    animation: recordingRingRipple 2s ease-out infinite;
    pointer-events: none;
}

@keyframes recordingRingRipple {
    0% {
        transform: translate(-50%, -50%) scale(0.85);
        opacity: 0.95;
    }
    100% {
        transform: translate(-50%, -50%) scale(2.1);
        opacity: 0;
    }
}

@keyframes recordingDotBreathe {
    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.06);
    }
}

@keyframes recordingBtnSoftGlow {
    0%,
    100% {
        box-shadow: 0 4px 18px rgba(239, 68, 68, 0.35);
    }
    50% {
        box-shadow: 0 6px 26px rgba(239, 68, 68, 0.5), 0 0 0 1px rgba(239, 68, 68, 0.12);
    }
}

.recording-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    background-color: var(--danger-color);
    border-radius: 50%;
    margin-right: 8px;
    animation: recordingBtnSoftGlow 2s ease-in-out infinite;
}

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 0;
    background:
        conic-gradient(from 20deg, transparent 0 22%, rgba(var(--primary-rgb), 0.25) 22% 52%, var(--primary-color) 52% 84%, transparent 84%),
        radial-gradient(circle at center, var(--surface-color) 0 42%, transparent 43%);
    animation: vbSpinner 0.9s linear infinite;
    margin: 20px auto;
    position: relative;
}

.loading-spinner::after {
    content: "V";
    position: absolute;
    inset: 10px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--surface-color);
    color: var(--primary-color);
    font-size: 0.72rem;
    font-weight: 900;
    font-family: var(--font-display);
}

.progress-bar {
    height: 8px;
    background-color: rgba(var(--primary-rgb), 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin: 20px 0;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    width: 0%;
    transition: width 0.5s ease-out;
    position: relative;
    overflow: hidden;
}

.progress-bar-fill.animated::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

.metric-card:nth-child(odd) {
    animation: slideInRight 0.55s ease-out both;
}

.metric-card:nth-child(even) {
    animation: slideInLeft 0.55s ease-out both;
}

.metric-card:nth-child(1) { animation-delay: 0.02s; }
.metric-card:nth-child(2) { animation-delay: 0.06s; }
.metric-card:nth-child(3) { animation-delay: 0.1s; }
.metric-card:nth-child(4) { animation-delay: 0.14s; }
.metric-card:nth-child(5) { animation-delay: 0.18s; }
.metric-card:nth-child(6) { animation-delay: 0.22s; }

.analysis .score-circle {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.charts-section canvas {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

/* ������ ���� ��������� �������� */
.dark-theme .progress-bar {
    background-color: rgba(255, 255, 255, 0.1);
}

.dark-theme .loading-spinner {
    border-color: rgba(255, 255, 255, 0.3);
    border-top-color: var(--dark-primary);
}

/* Progress container for analysis */
.progress-container {
    margin: 30px 0;
    padding: 20px;
    background: var(--surface-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    animation: fadeInUp 0.5s ease-out;
}

.dark-theme .progress-container {
    background: var(--dark-surface);
    border-color: var(--dark-border);
}

.progress-container.hidden {
    display: none;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    font-weight: 500;
    color: var(--text-primary);
}

.dark-theme .progress-text {
    color: var(--dark-text);
}

#progressPercent {
    font-weight: 700;
    color: var(--primary-color);
}

.dark-theme #progressPercent {
    color: var(--dark-primary);
}

.status.processing {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.status.processing .loading-spinner {
    margin: 0;
}

/* Animated progress bar enhancements */
.progress-bar-fill.animated {
    animation: progress-loading 2s ease-in-out infinite;
}

.progress-bar-fill.completed {
    animation: none;
}

/* Detailed analysis section */
.detailed-analysis-section {
    margin-top: 40px;
    padding: 25px;
    background: var(--surface-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    animation: slideInRight 0.6s ease-out 0.6s both;
}

.dark-theme .detailed-analysis-section {
    background: var(--dark-surface);
    border-color: var(--dark-border);
}

.detailed-analysis-section.hidden {
    display: none;
}

.detailed-analysis-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--text-primary);
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dark-theme .detailed-analysis-section h3 {
    color: var(--dark-text);
}

.filler-words-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.filler-word-tag {
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--warning-color), #f59e0b);
    color: white;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

.filler-word-tag:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.filler-word-tag .count {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    padding: 2px 8px;
    margin-left: 5px;
    font-size: 12px;
}

.detailed-analysis-section p {
    margin: 10px 0;
    line-height: 1.6;
    color: var(--text-secondary);
}

.dark-theme .detailed-analysis-section p {
    color: var(--dark-text-secondary);
}

/* �����: ������ �� ����������� ��������� */
.logo .logo-heading {
    display: flex;
    align-items: center;
    gap: 0.4em;
    flex-wrap: wrap;
}

.logo .logo-heading .logo-emoji {
    font-size: 1.15em;
    line-height: 1;
    user-select: none;
}

/* ������: ��������� */
.recording-section.recording-active {
    position: relative;
    padding: 1.25rem;
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(var(--primary-rgb), 0.25);
    animation: recordGlow 2s ease-in-out infinite;
}

@keyframes recordGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0.15); }
    50% { box-shadow: 0 0 24px 4px rgba(var(--primary-rgb), 0.2); }
}

.status.recording {
    color: var(--danger-color);
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* ������ ��������� �������: enhanced with shimmer */
.analysis-progress-panel {
    margin: 0 0 10px;
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius);
    border: 1.5px solid rgba(59, 130, 246, 0.2);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(139, 92, 246, 0.05));
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    will-change: transform, opacity;
}

.analysis-progress-panel:not(.hidden) {
    opacity: 1;
    transform: translateY(0);
}

.analysis-progress-panel.hidden {
    display: none !important;
    opacity: 0;
    margin: 0;
    padding: 0;
    border: none;
}

.dark-theme .analysis-progress-panel {
    border-color: rgba(96, 165, 250, 0.25);
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.1), rgba(139, 92, 246, 0.05));
}

.analysis-progress-label {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    transition: color 0.3s ease;
}

.analysis-progress-panel.complete .analysis-progress-label {
    color: #16A34A;
}

.dark-theme .analysis-progress-panel.complete .analysis-progress-label {
    color: #4ade80;
}

.analysis-progress-track {
    height: 10px;
    border-radius: 999px;
    background: var(--border-color);
    overflow: hidden;
}

.analysis-progress-track .progress-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: width 0.3s ease;
}

.analysis-progress-track .progress-bar-fill.animated {
    position: relative;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--primary-color));
    background-size: 200% 100%;
    animation: shimmerSlide 1.5s linear infinite;
}

.analysis-progress-track .progress-bar-fill.completed {
    background: linear-gradient(90deg, #16A34A, #22c55e);
}

@keyframes shimmerSlide {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.progress-text {
    margin-top: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: right;
    font-family: 'JetBrains Mono', monospace;
}

.progress-text span {
    color: var(--primary-color);
    font-weight: 700;
}

.dark-theme .progress-text span {
    color: var(--dark-primary);
}

.analysis-progress-panel.complete .progress-text span {
    color: #16A34A;
    font-size: 1.1rem;
}

/* ����������� ��������� */
.filler-detailed-table {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--border-color);
    text-align: left;
}

/* ���������� ������: GPU-accelerated */
.equalizer-canvas {
    display: block;
    width: 100%;
    max-width: 500px;
    height: 80px;
    margin: 16px auto 0;
    border-radius: var(--border-radius);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    will-change: transform, opacity;
}

.recording-section.recording-active .equalizer-canvas {
    opacity: 1;
    transform: translateY(0);
}

.dark-theme .equalizer-canvas {
    filter: brightness(0.9);
}

/* Skeleton loading for analysis section */
.analysis-skeleton { margin-bottom: 20px; }
.skeleton-grid { margin-top: 16px; }

/* Optimize animations: prefer compositor-only properties */
@media (prefers-reduced-motion: no-preference) {
    .hero-badge-dot,
    .hero-feature-icon,
    .hero-section h1,
    .hero-section .subtitle {
        will-change: transform, opacity;
    }
}

/* VU-���� ����� � ������� ������������ */
.recording-vu {
    display: none;
}

.dark-theme .recording-vu {
    background: rgba(var(--primary-rgb), 0.07);
    border-color: rgba(var(--primary-rgb), 0.25);
}

.recording-vu-track {
    height: 8px;
    width: 100%;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.35);
    overflow: hidden;
}

.recording-vu-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, #22c55e 0%, #f59e0b 55%, #ef4444 100%);
    transition: width 0.1s linear;
}

.recording-vu-caption {
    margin-top: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.dark-theme .recording-vu-caption {
    color: var(--dark-text-secondary);
}

.filler-detailed-title {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.filler-detailed-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filler-detailed-list li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(var(--primary-rgb), 0.08);
    font-size: 0.9rem;
}

.fw-count {
    font-weight: 700;
    color: var(--primary-color);
}

/* CAPTCHA ����������� */
.captcha-group {
    background: rgba(var(--primary-rgb), 0.05);
    padding: 12px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.captcha-question {
    font-weight: 600;
    margin: 8px 0;
}

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 10px;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.checkbox-row input,
.learning-option input[type="checkbox"] {
    margin-top: 2px;
}

.checkbox-row span,
.learning-option span {
    line-height: 1.45;
}

.tab-lock-badge {
    margin-left: 6px;
    font-size: 0.92em;
    font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
    font-variant-emoji: emoji;
    -webkit-text-fill-color: unset !important;
}

.tab--pro:not(.tab--locked) .tab-lock-badge {
    display: none;
}

.tab--pro {
    position: relative;
}

.tab-content--pro {
    position: relative;
}

.tab-content--pro .tab-lock-overlay {
    display: none;
}

.tab-content--locked .tab-lock-overlay {
    display: flex;
}

.tab--locked {
    opacity: 0.92;
}

.tab-lock-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 22px;
    padding-top: max(20px, env(safe-area-inset-top, 0px));
    /* �������������� ���� + ������� �������� ���� (�� ��������� ����� �����) */
    background: rgba(255, 255, 255, 0.42);
    backdrop-filter: blur(20px) saturate(130%);
    -webkit-backdrop-filter: blur(20px) saturate(130%);
}

.tab-lock-card {
    max-width: 440px;
    padding: 22px 24px;
    border-radius: 22px;
    text-align: center;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(59, 130, 246, 0.18);
    box-shadow: var(--shadow-lg);
}

.tab-lock-card h3 {
    margin: 0 0 8px;
    color: var(--text-primary);
}

.tab-lock-card p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

.tab-lock-card .tab-lock-buy-pro {
    margin-top: 16px;
    width: 100%;
    max-width: 280px;
}

.tab-lock-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .tab-content--locked .tab-lock-overlay {
        padding-top: max(12px, env(safe-area-inset-top, 0px));
        padding-bottom: 24px;
    }
}

.analysis-source-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 18px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 600;
}

.pro-hint {
    margin: 8px 0 0;
    font-size: 0.88rem;
    color: var(--warning-color);
}

.profile-modal-wide {
    max-height: min(90vh, 760px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.dark-theme .tab-lock-overlay {
    background: rgba(8, 12, 24, 0.48);
}

.dark-theme .tab-lock-card {
    background: rgba(15, 23, 42, 0.96);
    border-color: rgba(96, 165, 250, 0.24);
}

.dark-theme .tab-lock-card h3 {
    color: var(--dark-text);
}

.dark-theme .tab-lock-card p,
.dark-theme .analysis-source-badge {
    color: var(--dark-text-secondary);
}

/* �������� ������ */
.payment-test-banner {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: var(--border-radius);
    border: 2px dashed var(--primary-color);
    background: rgba(var(--primary-rgb), 0.06);
}

.payment-test-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 4px 8px;
    border-radius: 4px;
    background: var(--primary-color);
    color: white;
    margin-right: 8px;
    vertical-align: middle;
}

.payment-test-btn {
    font-size: 1.05rem;
}

.profile-modal-wide {
    max-width: 640px;
}

.profile-actions-row {
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 0;
}

.profile-password-panel {
    margin: 0 0 18px;
    padding: 14px 16px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(248, 250, 252, 0.92);
}

.profile-password-panel .form-group {
    margin-bottom: 12px;
}

.profile-password-panel .form-group:last-of-type {
    margin-bottom: 0;
}

.profile-password-hint {
    font-size: 0.92rem;
    color: var(--text-secondary);
    margin: 0 0 12px;
}

.profile-password-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.payment-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.payment-actions .btn {
    flex: 1 1 180px;
}

.dark-theme .profile-danger-panel .btn-danger,
.dark-theme #profileDeleteAccountBtn {
    background: linear-gradient(135deg, #ef4444, #b91c1c) !important;
    color: #ffffff !important;
    border-color: rgba(254, 202, 202, 0.45) !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
}

.dark-theme .profile-danger-panel .btn-danger:hover:not(:disabled),
.dark-theme #profileDeleteAccountBtn:hover:not(:disabled) {
    background: linear-gradient(135deg, #f87171, #dc2626) !important;
}

.dark-theme .profile-password-panel {
    background: rgba(15, 23, 42, 0.72);
    border-color: rgba(71, 85, 105, 0.45);
}

.dark-theme .profile-title {
    color: var(--dark-text);
}

@supports (content-visibility: auto) {
    .surface-card,
    .prepare-section,
    .learning-section,
    .exams-section,
    .challenges-section,
    .history-section {
        content-visibility: auto;
        contain-intrinsic-size: 1px 720px;
    }
}

/* �������� */
.learning-elevated {
    padding: 8px 0;
}

.level-card-glass {
    padding: 1.4rem;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    background: linear-gradient(180deg, rgba(var(--primary-rgb), 0.05), transparent);
}

.xp-line {
    margin-top: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.btn-small {
    padding: 8px 14px;
    font-size: 0.85rem;
    margin-top: 8px;
}

/* --- �������-��������: �����, ������, ����, �������� --- */
body {
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    animation: none;
    background:
        radial-gradient(ellipse 88% 58% at 12% -8%, rgba(var(--primary-rgb), 0.1), transparent 52%),
        radial-gradient(ellipse 72% 48% at 96% 8%, rgba(var(--accent-rgb), 0.08), transparent 48%),
        radial-gradient(ellipse 65% 42% at 48% 100%, rgba(14, 165, 233, 0.06), transparent 46%);
}

/* ������� ����: �������������� ������� ����, ����� ��� ������� ��� �������� */
body:not(.dark-theme)::before {
    opacity: 0.72;
    background:
        radial-gradient(ellipse 100% 72% at 14% -4%, rgba(79, 70, 229, 0.26), transparent 56%),
        radial-gradient(ellipse 92% 62% at 94% 8%, rgba(37, 99, 235, 0.24), transparent 52%),
        radial-gradient(ellipse 88% 58% at 46% 102%, rgba(8, 145, 178, 0.2), transparent 50%),
        radial-gradient(ellipse 70% 48% at 62% 42%, rgba(147, 51, 234, 0.14), transparent 58%);
}

/* Ҹ���� ���� */
.dark-theme body::before {
    opacity: 0.38;
    background:
        radial-gradient(ellipse 80% 50% at 25% 5%, rgba(var(--dark-primary-rgb), 0.06), transparent 50%),
        radial-gradient(ellipse 55% 40% at 95% 30%, rgba(99, 102, 241, 0.07), transparent 42%),
        radial-gradient(ellipse 45% 30% at 40% 95%, rgba(14, 165, 233, 0.05), transparent 38%);
}

.logo .logo-heading .logo-title {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.dark-theme .logo .logo-heading .logo-title {
    background: linear-gradient(135deg, var(--dark-primary), #93c5fd);
    -webkit-background-clip: text;
    background-clip: text;
}

.tabs-lead {
    text-align: center;
    max-width: 52rem;
    margin: clamp(0.85rem, 2vw, 1.5rem) auto 1.25rem;
    padding: 0 0.5rem;
    font-size: 0.98rem;
    line-height: 1.55;
    color: var(--text-secondary);
    animation: fadeInUp 0.6s ease-out 0.15s both;
}

.dark-theme .tabs-lead {
    color: var(--dark-text-secondary);
}

.workflow-rail {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 0.5rem;
    margin: 0 0 28px;
    padding: 18px 20px;
    border-radius: var(--border-radius-lg);
    background: linear-gradient(145deg, rgba(255,255,255,0.97), rgba(240,244,255,0.97));
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-clay);
    flex-wrap: wrap;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.workflow-rail:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-clay-hover);
}

.workflow-rail.hidden {
    display: none;
}

#workflowPractice.workflow-rail {
    margin-bottom: 16px;
}

@media (max-width: 768px) {
    #workflowPractice.workflow-rail {
        margin-bottom: 12px;
        padding: 14px 16px;
    }
}

#practiceTab > .surface-card.surface-card--accent.reveal-on-scroll {
    margin-bottom: 14px;
}

.dark-theme .workflow-rail {
    background: linear-gradient(145deg, rgba(30,41,59,0.95), rgba(15,23,42,0.95));
    border-color: rgba(51,65,85,0.5);
    box-shadow: 8px 8px 16px rgba(0, 0, 0, 0.3), -8px -8px 16px rgba(255, 255, 255, 0.05);
}

.workflow-step {
    flex: 1 1 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 12px 10px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(59, 130, 246, 0.1);
    background: linear-gradient(145deg, #ffffff, #f8faff);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.85;
    box-shadow: var(--shadow-sm);
}

.workflow-step.is-done {
    opacity: 0.9;
}

.workflow-step.is-active {
    opacity: 1;
    background: linear-gradient(145deg, #e8f0ff, #d8e8ff);
    border-color: rgba(59, 130, 246, 0.35);
    box-shadow: var(--shadow-clay);
    transform: translateY(-4px);
}

.dark-theme .workflow-step.is-active {
    background: rgba(var(--dark-primary-rgb), 0.12);
    border-color: rgba(var(--dark-primary-rgb), 0.35);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.workflow-num {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    margin-bottom: 8px;
    background: linear-gradient(145deg, #ffffff, #e8f0ff);
    color: var(--primary-color);
    box-shadow: var(--shadow-clay);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.workflow-step.is-active .workflow-num {
    background: linear-gradient(145deg, #3b82f6, #2563eb);
    color: white;
    transform: scale(1.15);
    box-shadow: var(--shadow-clay-hover);
}

.dark-theme .workflow-num {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    color: var(--dark-primary);
    border-color: var(--dark-border);
}

.dark-theme .workflow-step.is-active .workflow-num {
    color: white;
}

.workflow-label {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-primary);
}

.dark-theme .workflow-label {
    color: var(--dark-text);
}

.workflow-hint {
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
    line-height: 1.3;
}

.dark-theme .workflow-hint {
    color: var(--dark-text-secondary);
}

.workflow-line {
    width: 1px;
    min-height: 3rem;
    align-self: center;
    background: linear-gradient(180deg, transparent, rgba(var(--primary-rgb), 0.35), transparent);
    flex: 0 0 auto;
}

.dark-theme .workflow-line {
    background: linear-gradient(180deg, transparent, var(--dark-border), transparent);
}

@media (max-width: 640px) {
    .workflow-line {
        display: none;
    }
}

.surface-card {
    margin-bottom: 24px;
    padding: 24px 26px 26px;
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.8);
    background: linear-gradient(145deg, #ffffff, #f8faff);
    box-shadow: var(--shadow-clay);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.surface-card:hover {
    box-shadow: var(--shadow-clay-hover);
    border-color: rgba(59, 130, 246, 0.25);
    transform: translateY(-3px);
}

.dark-theme .surface-card {
    background: rgba(30, 41, 59, 0.65);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-color: rgba(51, 65, 85, 0.5);
    box-shadow: 8px 8px 16px rgba(0, 0, 0, 0.3), -8px -8px 16px rgba(255, 255, 255, 0.05);
}

.dark-theme .surface-card:hover {
    box-shadow: 12px 12px 24px rgba(0, 0, 0, 0.4), -12px -12px 24px rgba(255, 255, 255, 0.07);
}

.surface-card--accent {
    border-color: rgba(59, 130, 246, 0.2);
    background: linear-gradient(165deg, rgba(59, 130, 246, 0.08) 0%, #ffffff 40%);
}

.dark-theme .surface-card--accent {
    background: linear-gradient(165deg, rgba(96, 165, 250, 0.12) 0%, rgba(30, 41, 59, 0.65) 45%);
}

.surface-card--elevated {
    box-shadow: var(--shadow-clay);
    border-color: rgba(59, 130, 246, 0.15);
}

.section-head {
    display: flex;
    gap: 1.1rem;
    align-items: flex-start;
    margin-bottom: 1.35rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(59, 130, 246, 0.12);
}

.section-head--compact {
    margin-bottom: 1rem;
    padding-bottom: 0.85rem;
}

.dark-theme .section-head {
    border-bottom-color: rgba(96, 165, 250, 0.12);
}

.section-step-num {
    flex-shrink: 0;
    font-size: 28px;
    font-weight: 900;
    font-family: var(--font-display);
    color: var(--primary-color);
    background: linear-gradient(135deg, rgba(59,130,246,0.1), rgba(139,92,246,0.08));
    border-radius: 10px;
    padding: 4px 10px;
    line-height: 1.2;
    letter-spacing: -0.5px;
    transition: transform 0.3s ease, background 0.3s ease;
}

.section-step-num:hover {
    transform: scale(1.05);
    background: linear-gradient(135deg, rgba(59,130,246,0.15), rgba(139,92,246,0.12));
}

.dark-theme .section-step-num {
    color: var(--dark-primary);
    background: linear-gradient(135deg, rgba(96,165,250,0.15), rgba(139,92,246,0.1));
}

.section-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-primary);
    line-height: 1.3;
    letter-spacing: -0.2px;
    hyphens: manual;
    -webkit-hyphens: manual;
    overflow-wrap: normal;
    word-break: normal;
    text-wrap: balance;
}

.dark-theme .section-title {
    color: var(--dark-text);
}

.section-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-top: 4px;
}

.dark-theme .section-desc {
    color: var(--dark-text-secondary);
}

.dark-theme .section-step-num {
    background: linear-gradient(180deg, #60A5FA, #3B82F6);
    -webkit-background-clip: text;
}

.dark-theme .section-step-num {
    background: linear-gradient(180deg, var(--dark-primary), #93c5fd);
    -webkit-background-clip: text;
    background-clip: text;
}

.section-head-text {
    flex: 1;
    text-align: left;
}

.section-title-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem 0.65rem;
    flex-wrap: nowrap;
    position: relative;
}

.section-title-row .section-title {
    margin: 0;
    flex: 1 1 0%;
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
    word-wrap: break-word;
    text-wrap: wrap;
}

.recording-help-wrap {
    position: relative;
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 0.08em;
}

.recording-help-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(59, 130, 246, 0.35);
    background: rgba(255, 255, 255, 0.94);
    color: var(--primary-color);
    font-weight: 800;
    font-size: 0.95rem;
    line-height: 1;
    white-space: nowrap;
    cursor: help;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.recording-help-btn__glyph {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
    -webkit-hyphens: none;
    pointer-events: none;
}

.recording-help-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.dark-theme .recording-help-btn {
    background: rgba(30, 41, 59, 0.92);
    border-color: rgba(96, 165, 250, 0.35);
    color: var(--dark-primary);
}

.recording-help-btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

@media (max-width: 380px) {
    .recording-help-btn {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
        font-size: 0.88rem;
    }
}

.recording-help-popover {
    display: none;
    position: absolute;
    z-index: 10070;
    top: calc(100% + 10px);
    /* ��������� �� ������� ���� ������ �?�: ������������� left:50% ����� ������� ���� �� ���� ������ � ��� �������� �������� */
    left: auto;
    right: 0;
    transform: none;
    box-sizing: border-box;
    width: min(26rem, calc(100vw - 1.5rem)) !important;
    max-width: min(26rem, calc(100vw - 1.5rem)) !important;
    min-width: min(17rem, calc(100vw - 1rem)) !important;
    max-height: min(72vh, 460px);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--surface-color);
    border: 1px solid rgba(59, 130, 246, 0.18);
    box-shadow: var(--shadow-lg);
    font-size: clamp(0.9rem, 0.25vw + 0.84rem, 0.95rem);
    line-height: 1.55;
    color: var(--text-secondary);
    text-align: left;
    hyphens: manual;
    -webkit-hyphens: manual;
    word-break: normal;
    overflow-wrap: break-word;
    -webkit-overflow-scrolling: touch;
}

.dark-theme .recording-help-popover {
    background: rgba(30, 41, 59, 0.98);
    border-color: rgba(96, 165, 250, 0.22);
    color: var(--dark-text-secondary);
}

.recording-help-item + .recording-help-item {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.dark-theme .recording-help-item + .recording-help-item {
    border-top-color: rgba(148, 163, 184, 0.18);
}

.recording-help-item__title {
    font-weight: 750;
    font-size: 0.92rem;
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.45;
}

.dark-theme .recording-help-item__title {
    color: var(--dark-text);
}

.recording-help-item__text {
    margin: 0;
    font-size: clamp(0.86rem, 0.2vw + 0.82rem, 0.92rem);
    line-height: 1.55;
    hyphens: manual;
    -webkit-hyphens: manual;
    word-break: normal;
    overflow-wrap: break-word;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
}

.recording-help-popover__inner {
    hyphens: manual;
    -webkit-hyphens: manual;
    word-break: normal;
    overflow-wrap: break-word;
    width: 100%;
    max-width: none;
    min-width: 0;
    box-sizing: border-box;
}

@media (hover: hover) and (pointer: fine) {
    .recording-help-wrap:hover .recording-help-popover,
    .recording-help-wrap:focus-within .recording-help-popover {
        display: block;
    }
}

.recording-help-wrap.recording-help-wrap--open .recording-help-popover {
    display: block;
}

/* �������: ����� ����������� � body (main.js) � ���������� �� ������, �� �� ����������� */
@media (max-width: 768px) {
    .recording-help-popover.recording-help-popover--detached {
        display: block !important;
    }
}

/* �������� .surface-card / ����� ���� ����������� ����� (�� ������ ����������� ����). ��������� ����, ���� ��������� �����. */
.surface-card:has(.recording-help-wrap:hover),
.surface-card:has(.recording-help-wrap:focus-within),
.surface-card:has(.recording-help-wrap.recording-help-wrap--open),
.prepare-hero:has(.recording-help-wrap:hover),
.prepare-hero:has(.recording-help-wrap:focus-within),
.prepare-hero:has(.recording-help-wrap.recording-help-wrap--open) {
    position: relative;
    z-index: 4800;
    /* ����� overflow:hidden � .surface-card �������� ����� ����� (� �������� ��������� ��� �������� � ������� ���). */
    overflow: visible;
    contain: none;
}

/* �������� � ������� �?�: �� ��������� ���������; containment ������ ��������� ������������ ������ */
.surface-card:has(.recording-help-wrap) {
    overflow: visible;
    contain: none;
}

/* #prepareTab ����� .surface-card { z-index: 0 } � ����� ������� �������������� � ��������� �������� � �?� ����. */
#prepareTab .surface-card:has(.recording-help-wrap:hover),
#prepareTab .surface-card:has(.recording-help-wrap:focus-within),
#prepareTab .surface-card:has(.recording-help-wrap.recording-help-wrap--open),
#prepareTab .surface-card:has(.recording-help-wrap) {
    z-index: 4800;
    overflow: visible;
    contain: none;
}

/* �������� ��������� � �?� � ��������� � ����� ��������� ������ � �������� stacking ������ */
#practiceTab .surface-card:has(.recording-help-wrap:hover),
#practiceTab .surface-card:has(.recording-help-wrap:focus-within),
#practiceTab .surface-card:has(.recording-help-wrap.recording-help-wrap--open),
#practiceTab .surface-card:has(.recording-help-wrap) {
    z-index: 4800;
    overflow: visible;
    contain: none;
}

.section-title {
    margin: 0 0 0.35rem;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-primary);
}

.dark-theme .section-title {
    color: var(--dark-text);
}

/* ������ ������ ���������� ������ ������ �������� (�������, FAQ-���� � �.�.) */
.surface-card .section-title {
    font-size: clamp(0.98rem, 0.85vw + 0.9rem, 1.12rem);
    font-weight: 800;
    line-height: 1.28;
    letter-spacing: -0.2px;
}

.section-desc {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--text-secondary);
}

.dark-theme .section-desc {
    color: var(--dark-text-secondary);
}

/* ��������� prepare-hero � �?�: ������ .surface-card (#prepareTab � ��.) ����� z-index:0 � ����������� ������ ����� */
.prepare-hero:has(.recording-help-wrap) {
    position: relative;
    z-index: 40;
}

.prepare-hero {
    margin-bottom: 1.5rem;
    text-align: left;
    padding: 1rem 0 0.5rem;
    max-width: var(--vb-main-content-max-width);
    margin-left: auto;
    margin-right: auto;
    overflow: visible;
}

.prepare-eyebrow {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary-color);
    margin-bottom: 0.35rem;
}

.dark-theme .prepare-eyebrow {
    color: var(--dark-primary);
}

.prepare-hero h2 {
    margin: 0 0 0.6rem;
    font-size: clamp(1.45rem, 3.5vw, 1.85rem);
    font-weight: 800;
    color: var(--text-primary);
    hyphens: manual;
    -webkit-hyphens: manual;
    overflow-wrap: normal;
    word-break: normal;
    text-wrap: balance;
}

.dark-theme .prepare-hero h2 {
    color: var(--dark-text);
}

.prepare-hero-title-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem 0.65rem;
    flex-wrap: nowrap;
    margin-bottom: 0.6rem;
    position: relative;
}

.prepare-hero-title-row h2 {
    margin: 0;
    flex: 1 1 0%;
    min-width: 0;
    font-size: clamp(1.45rem, 3.5vw, 1.85rem);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    hyphens: manual;
    -webkit-hyphens: manual;
    overflow-wrap: break-word;
    word-break: break-word;
    text-wrap: wrap;
    word-wrap: break-word;
}

@supports (text-wrap: pretty) {
    .prepare-hero h2 {
        text-wrap: pretty;
    }
}

.dark-theme .prepare-hero-title-row h2 {
    color: var(--dark-text);
}

/* �?� � ����������: �������/������� � ������������� ���� ������, ��� �������� ������ �������� */
@media (max-width: 768px) {
    .prepare-hero-title-row {
        padding-right: max(4.5rem, calc(3.75rem + env(safe-area-inset-right, 0px)));
        position: relative;
    }

    .prepare-hero-title-row .recording-help-wrap {
        position: absolute;
        top: 0.32rem;
        right: max(6px, env(safe-area-inset-right, 0px));
        margin-top: 0;
        z-index: 6;
    }

    .section-title-row {
        padding-right: max(4.5rem, calc(3.75rem + env(safe-area-inset-right, 0px)));
    }

    .section-title-row .recording-help-wrap {
        position: absolute;
        top: 0.22rem;
        right: max(6px, env(safe-area-inset-right, 0px));
        margin-top: 0;
        z-index: 6;
    }

    .recording-help-btn {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
        font-size: 1rem;
        box-shadow:
            0 0 0 2px rgba(255, 255, 255, 0.95),
            0 2px 10px rgba(37, 99, 235, 0.28);
    }

    .dark-theme .recording-help-btn {
        box-shadow:
            0 0 0 2px rgba(15, 23, 42, 0.9),
            0 2px 12px rgba(37, 99, 235, 0.35);
    }

    /*
     * ����� �?�: ������ �� 100vw ��� position:absolute ��������� �� ����� ������ ������ �
     * ����� ���� ������ �� �����. �� ����� ������� � fixed � viewport + top ����� JS.
     */
    .recording-help-popover {
        position: fixed !important;
        left: max(0.75rem, env(safe-area-inset-left, 0px)) !important;
        right: max(0.75rem, env(safe-area-inset-right, 0px)) !important;
        width: auto !important;
        max-width: min(26rem, calc(100vw - 1.5rem)) !important;
        min-width: 0 !important;
        top: var(--recording-help-popover-top, 120px) !important;
        bottom: auto !important;
        transform: none !important;
        margin: 0 auto !important;
        padding-left: max(14px, env(safe-area-inset-left, 0px)) !important;
        padding-right: max(14px, env(safe-area-inset-right, 0px)) !important;
        max-height: min(72vh, 460px, calc(100dvh - var(--recording-help-popover-top, 120px) - 12px)) !important;
        z-index: 200000 !important;
        overflow-x: hidden !important;
        text-align: left !important;
        hyphens: none !important;
        -webkit-hyphens: none !important;
    }

    .recording-help-wrap {
        z-index: 5;
    }

    /* ����� �������� ��������� � �?�: �� ��� workflow / ������� ����������� ������ */
    #practiceTab .surface-card .section-head:has(.recording-help-wrap) {
        overflow: visible;
        position: relative;
        z-index: 60;
        isolation: isolate;
    }
}

.prepare-intro {
    margin: 0;
    max-width: 46rem;
    font-size: 0.98rem;
    line-height: 1.6;
    color: var(--text-secondary);
    text-wrap: pretty;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
}

.dark-theme .prepare-intro {
    color: var(--dark-text-secondary);
}

.btn-outline {
    background: transparent !important;
    color: var(--primary-color) !important;
    border: 2px solid rgba(var(--primary-rgb), 0.45) !important;
    box-shadow: none !important;
}

.btn-outline:hover:not(:disabled) {
    background: rgba(var(--primary-rgb), 0.08) !important;
    border-color: var(--primary-color) !important;
}

.dark-theme .btn-outline {
    color: var(--dark-primary) !important;
    border-color: rgba(var(--dark-primary-rgb), 0.45) !important;
}

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    /* translateY(0) �� ��� ����� containing block � ������ position:fixed � ��������� �?� */
    transform: none;
}

.reveal-on-scroll.hidden {
    display: none !important;
    opacity: 0;
}

/* �� ��������� ��������� �������� �� ������� ��� ����� � ������ repaint; ������� �������� */
@media (max-width: 768px) {
    .reveal-on-scroll,
    .surface-card.reveal-on-scroll {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .reveal-on-scroll,
    .surface-card.reveal-on-scroll {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

.tab-content {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* ��� fade �� PRO-�������� � ������ � ����� �� ���� ������� ������������� ������� ��� �������� */
.tab-content--locked {
    transition: none !important;
}

.tab-content.active {
    display: block;
    opacity: 1;
}

.tab-content.active:not(.tab-content--locked) {
    transition: opacity 0.3s ease;
}

.tab-content.active.tab-content--locked {
    transition: none !important;
    opacity: 1 !important;
}

.tab-content.active.tab-content--enter {
    opacity: 1;
}

@media (max-width: 768px) {
    .tab-content,
    .tab-content.active:not(.tab-content--locked) {
        transition: none !important;
    }
}

@keyframes tabPanelIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat {
    animation: statLift 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.stat:nth-child(2) {
    animation-delay: 0.08s;
}

@keyframes statLift {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.questions-section.surface-card {
    background: linear-gradient(180deg, rgba(var(--primary-rgb), 0.04), var(--surface-color));
}

.dark-theme .questions-section.surface-card {
    background: linear-gradient(180deg, rgba(var(--dark-primary-rgb), 0.08), var(--dark-surface));
}

.history-section.surface-card {
    background: var(--light-color);
    border-style: solid;
}

.dark-theme .history-section.surface-card {
    background: rgba(15, 23, 42, 0.5);
}

.questions-just-opened {
    animation: questionsPop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes questionsPop {
    from {
        opacity: 0.6;
        transform: scale(0.985);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.question-card {
    animation: cardStagger 0.45s ease-out both;
}

.question-card:nth-child(1) { animation-delay: 0.03s; }
.question-card:nth-child(2) { animation-delay: 0.08s; }
.question-card:nth-child(3) { animation-delay: 0.13s; }
.question-card:nth-child(4) { animation-delay: 0.18s; }
.question-card:nth-child(5) { animation-delay: 0.23s; }

@keyframes cardStagger {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.analysis.surface-card {
    margin-top: 0.5rem;
    padding-top: 1.75rem;
}

/* ���������, ���� � �������, ���� �� */
.draft-notice {
    margin: 0 0 1rem;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    line-height: 1.45;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.12), rgba(var(--secondary-rgb), 0.06));
    border: 1px solid rgba(var(--primary-rgb), 0.25);
    color: var(--text-primary);
    animation: draftFade 0.5s ease-out both;
}

.dark-theme .draft-notice {
    color: var(--dark-text);
    border-color: rgba(var(--dark-primary-rgb), 0.35);
    background: linear-gradient(135deg, rgba(var(--dark-primary-rgb), 0.15), transparent);
}

.draft-notice--hidden {
    display: none;
}

.draft-notice-wrap {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 0 0 1rem;
}

.draft-notice-wrap .draft-notice {
    flex: 1;
    min-width: 200px;
    margin: 0;
}

.draft-notice-wrap--hidden {
    display: none;
}

@media (max-width: 640px) {
    .draft-notice-wrap {
        flex-direction: column;
        align-items: stretch;
        gap: 0.65rem;
        margin-left: auto;
        margin-right: auto;
        max-width: min(100%, 560px);
    }

    .draft-notice-wrap .draft-notice {
        flex: none;
        width: 100%;
        text-align: center;
    }

    .draft-notice-wrap .btn {
        align-self: center;
        margin: 0;
    }
}

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

@keyframes draftFade {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.textarea-meta {
    margin-top: 0.35rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

.dark-theme .textarea-meta {
    color: var(--dark-text-secondary);
}

.textarea-meta.textarea-meta--near-limit {
    color: var(--warning-color);
}

.textarea-meta.textarea-meta--over-limit {
    color: var(--danger-color);
}

.dark-theme .textarea-meta.textarea-meta--near-limit {
    color: #fbbf24;
}

.dark-theme .textarea-meta.textarea-meta--over-limit {
    color: #f87171;
}

.textarea-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.65rem;
}

.button-group--wrap {
    flex-wrap: wrap;
}

.outline-panel {
    margin-top: 1rem;
    padding: 1.1rem 1.25rem 1.25rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    background: linear-gradient(180deg, rgba(var(--primary-rgb), 0.06), var(--surface-color));
    box-shadow: var(--shadow-sm);
    animation: outlineIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.dark-theme .outline-panel {
    background: linear-gradient(180deg, rgba(var(--dark-primary-rgb), 0.1), var(--dark-surface));
    border-color: var(--dark-border);
}

.outline-panel--hidden {
    display: none;
}

@keyframes outlineIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.outline-panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-bottom: 0.85rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.12);
}

.dark-theme .outline-panel-head {
    border-bottom-color: var(--dark-border);
}

.outline-panel-title {
    flex: 1 1 200px;
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-primary);
}

.dark-theme .outline-panel-title {
    color: var(--dark-text);
}

.outline-body {
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--text-primary);
}

.dark-theme .outline-body {
    color: var(--dark-text);
}

.outline-segment {
    margin-bottom: 0.85rem;
}

.outline-segment-title {
    margin: 0 0 0.35rem;
    font-size: 0.88rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary-color);
}

.dark-theme .outline-segment-title {
    color: var(--dark-primary);
}

.outline-list {
    margin: 0;
    padding-left: 1.2rem;
}

.outline-list li {
    margin: 0.25rem 0;
    color: var(--text-secondary);
}

.dark-theme .outline-list li {
    color: var(--dark-text-secondary);
}

.outline-hooks {
    margin: 0.75rem 0 0;
    font-size: 0.86rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.dark-theme .outline-hooks {
    color: var(--dark-text-secondary);
}

.outline-mins {
    font-weight: 700;
    color: var(--primary-color);
}

.outline-from-audio {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.88em;
    color: var(--text-secondary);
}

.dark-theme .outline-mins {
    color: var(--dark-primary);
}

.pro-inline-badge {
    display: inline-block;
    margin-left: 0.2rem;
    padding: 0.05em 0.4em 0.08em;
    font-size: 0.66em;
    font-weight: 800;
    vertical-align: 0.12em;
    line-height: 1;
    border-radius: 4px;
    color: #fff;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.textarea-actions--pro-tools {
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.pro-hint--report-eval {
    margin: 0.4rem 0 0;
    font-size: 0.84rem;
}

.report-eval-panel {
    margin: 0.75rem 0 0;
    padding: 1rem 1.15rem 1.1rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    background: var(--surface-color);
    box-shadow: var(--shadow-sm);
    animation: outlineIn 0.4s ease both;
}

.dark-theme .report-eval-panel {
    background: var(--dark-surface);
    border-color: var(--dark-border);
}

.report-eval-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}

.report-eval-title {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 800;
    color: var(--text-primary);
}

.dark-theme .report-eval-title {
    color: var(--dark-text);
}

.report-eval-body {
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--text-primary);
}

.dark-theme .report-eval-body {
    color: var(--dark-text);
}

.report-eval-score {
    display: flex;
    align-items: baseline;
    gap: 0.5rem 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.6rem;
}

.report-eval-dim {
    margin: 0.55rem 0 0.15rem;
    font-size: 0.83rem;
    font-weight: 800;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.dark-theme .report-eval-dim {
    color: var(--dark-primary);
}

.report-eval-dim p {
    margin: 0.2rem 0 0;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
    color: var(--text-primary);
    line-height: 1.45;
}

.dark-theme .report-eval-dim p {
    color: var(--dark-text);
}

.report-eval-lexical-note {
    margin: 0.75rem 0 0;
    padding: 0.65rem 0.75rem;
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--text-secondary);
    background: rgba(217, 119, 6, 0.08);
    border: 1px solid rgba(217, 119, 6, 0.22);
    border-radius: var(--border-radius-sm);
}

.dark-theme .report-eval-lexical-note {
    color: var(--dark-text-secondary);
    background: rgba(251, 191, 36, 0.08);
    border-color: rgba(251, 191, 36, 0.22);
}

.report-eval-cloud-hint {
    margin: 0 0 0.5rem;
}

.provider-health {
    margin-left: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0;
}

.provider-health::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: dotPulse 2s ease-in-out infinite;
}

.provider-health.online::before {
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.3);
}

.provider-health.offline::before {
    background: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.3);
    animation: none;
}

@media (hover: none) and (pointer: coarse) {
    .container:hover,
    .surface-card:hover,
    .hero-feature-card:hover,
    .level-card:hover {
        transform: none;
    }
}

@media (max-width: 768px) {
    /* Sticky ����: ��� overflow-x:hidden � ����� ���������� ������ ��������� �?� (.recording-help-popover). �������������� ����� ����� html/body � mobile-fix. */
    .container {
        overflow-x: visible;
        overflow-y: visible;
        contain: style;
    }

    .container:hover {
        transform: none;
    }

    .tabs {
        position: sticky;
        top: 64px;
        z-index: 25;
        background: var(--surface-color);
        padding: 0.35rem 0.2rem;
        border-radius: 10px;
        border: 1px solid rgba(var(--primary-rgb), 0.12);
    }

    .dark-theme .tabs {
        background: var(--dark-surface);
        border-color: var(--dark-border);
    }

    .workflow-rail {
        overflow-x: auto;
        flex-wrap: nowrap;
        scroll-snap-type: x mandatory;
        padding-bottom: 0.3rem;
    }

    .workflow-step {
        min-width: 160px;
        scroll-snap-align: start;
    }

    .section-head {
        gap: 0.7rem;
    }

    .section-step-num {
        font-size: 1.4rem;
    }

    .history-item {
        grid-template-columns: 1fr;
    }

    .history-open-btn {
        width: 100%;
    }

    .learning-chapters {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   ������������� ����������� ������ ��� DARK-THEME
   �������������� ��� var(--text-primary) � var(--text-secondary)
   ��� dark-theme ������ � ����� ����� CSS
   ===================================================== */
.dark-theme {
    --text-primary: #f1f5f9 !important;
    --text-secondary: #94a3b8 !important;
}

.dark-theme h1,
.dark-theme h2,
.dark-theme h3,
.dark-theme h4,
.dark-theme h5,
.dark-theme h6,
.dark-theme p,
.dark-theme span,
.dark-theme li,
.dark-theme label,
.dark-theme div,
.dark-theme strong,
.dark-theme .subtitle,
.dark-theme .metric-value,
.dark-theme .score-text,
.dark-theme .exam-review-q,
.dark-theme .history-title,
.dark-theme .question-text,
.dark-theme .challenge-card h4,
.dark-theme .section-title,
.dark-theme .outline-body,
.dark-theme .outline-list li {
    color: #f1f5f9 !important;
}

.dark-theme .text-muted,
.dark-theme .text-secondary,
.dark-theme .metric-comment,
.dark-theme .exam-review-a,
.dark-theme .history-meta,
.dark-theme .challenge-desc,
.dark-theme .section-desc,
.dark-theme .outline-segment-title,
.dark-theme .filler-word-tag,
.dark-theme .provider-health,
.dark-theme .textarea-meta {
    color: #94a3b8 !important;
}

/* =====================================================
   FORCED DARK THEME COLORS - Highest Priority Override
   Uses direct color values to ensure visibility
   ===================================================== */
/* ������������ ��� body ���������� canvas �� swirl (z-index -3 ��� ����� body) */
body.dark-theme {
    background: transparent !important;
    color: #f1f5f9 !important;
}

body.dark-theme *,
body.dark-theme *::before,
body.dark-theme *::after {
    border-color: #334155 !important;
}

body.dark-theme h1,
body.dark-theme h2,
body.dark-theme h3,
body.dark-theme h4,
body.dark-theme h5,
body.dark-theme h6 {
    color: #f1f5f9 !important;
}

body.dark-theme p,
body.dark-theme span,
body.dark-theme li,
body.dark-theme label {
    color: #f1f5f9 !important;
}

body.dark-theme .subtitle,
body.dark-theme .section-desc,
body.dark-theme .prepare-intro,
body.dark-theme .timing-adapt-hint {
    color: #94a3b8 !important;
}

body.dark-theme .surface-card,
body.dark-theme .container {
    background: #1e293b !important;
    border-color: #334155 !important;
}

body.dark-theme .hero-section h1 {
    color: #f1f5f9 !important;
}

body.dark-theme .hero-section .subtitle {
    color: #94a3b8 !important;
}

body.dark-theme .hero-feature-card {
    background: linear-gradient(145deg, #1e293b, #0f172a) !important;
    border-color: #334155 !important;
}

body.dark-theme .hero-feature-card strong {
    color: #f1f5f9 !important;
}

body.dark-theme .hero-feature-card span:last-child {
    color: #94a3b8 !important;
}

body.dark-theme .metric-card {
    background: #1e293b !important;
    border-color: #334155 !important;
}

body.dark-theme .metric-value {
    color: #f1f5f9 !important;
}

body.dark-theme .metric-title {
    color: #60A5FA !important;
}

body.dark-theme .metric-comment {
    color: #94a3b8 !important;
}

body.dark-theme .score-text {
    fill: #f1f5f9 !important;
}

body.dark-theme input,
body.dark-theme textarea,
body.dark-theme select {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #f1f5f9 !important;
}

body.dark-theme input::placeholder,
body.dark-theme textarea::placeholder {
    color: #64748b !important;
}

body.dark-theme .tab {
    background: rgba(25, 38, 60, 0.8) !important;
    color: #a8b8d8 !important;
    border-color: rgba(71, 85, 105, 0.4) !important;
}

body.dark-theme .tab.active {
    background: linear-gradient(135deg, #60A5FA, #7c3aed) !important;
    color: white !important;
}

body.dark-theme .tab:hover {
    background: rgba(35, 52, 80, 0.9) !important;
    color: #c8d8f0 !important;
}

body.dark-theme .question-card {
    background: #1e293b !important;
    border-color: #334155 !important;
}

body.dark-theme .question-text {
    color: #f1f5f9 !important;
}

body.dark-theme .history-section {
    background: #1e293b !important;
    border-color: #334155 !important;
}

body.dark-theme .history-title {
    color: #f1f5f9 !important;
}

body.dark-theme .history-meta {
    color: #94a3b8 !important;
}

body.dark-theme .question-answer {
    background: rgba(59, 130, 246, 0.15) !important;
    color: #f1f5f9 !important;
}

body.dark-theme .questions-section {
    background: #1e293b !important;
}

body.dark-theme .feedback-section,
body.dark-theme .recommendations-section {
    background: #1e293b !important;
}

body.dark-theme .recommendations-section li {
    background: #1e293b !important;
    border-left-color: #3B82F6 !important;
}

body.dark-theme .outline-panel {
    background: #1e293b !important;
    border-color: #334155 !important;
}

body.dark-theme .outline-body {
    color: #f1f5f9 !important;
}

body.dark-theme .outline-list li {
    color: #94a3b8 !important;
}

body.dark-theme .timing-adapt-panel {
    background: linear-gradient(160deg, rgba(59, 130, 246, 0.1), transparent) !important;
    border-color: #334155 !important;
}

body.dark-theme .timing-chip {
    background: linear-gradient(145deg, #1e293b, #0f172a) !important;
    color: #f1f5f9 !important;
    border-color: #334155 !important;
}

body.dark-theme .timing-chip-active {
    background: linear-gradient(145deg, #60A5FA, #3B82F6) !important;
    color: white !important;
}

body.dark-theme .generated-speech {
    background: #1e293b !important;
}

body.dark-theme .speech-output {
    background: #0f172a !important;
    color: #f1f5f9 !important;
}

body.dark-theme .adaptation-notes {
    background: rgba(59, 130, 246, 0.15) !important;
    color: #f1f5f9 !important;
}

body.dark-theme .exam-question-box {
    background: linear-gradient(145deg, #1e293b, #0f172a) !important;
    border-color: #334155 !important;
}

body.dark-theme .exam-question-box h3 {
    color: #f1f5f9 !important;
}

body.dark-theme .challenge-card {
    background: linear-gradient(145deg, #1e293b, #0f172a) !important;
    border-color: #334155 !important;
}

body.dark-theme .challenge-card h4 {
    color: #f1f5f9 !important;
}

body.dark-theme .challenge-card p,
body.dark-theme .challenge-desc {
    color: #94a3b8 !important;
}

body.dark-theme .charts-section {
    background: #1e293b !important;
}

body.dark-theme .level-info,
body.dark-theme .levels-container,
body.dark-theme .level-rewards,
body.dark-theme .level-tasks {
    background: #1e293b !important;
    border-color: #334155 !important;
}

body.dark-theme .level-info h3 {
    color: #f1f5f9 !important;
}

body.dark-theme .learning-chapter-card {
    background: linear-gradient(160deg, rgba(59, 130, 246, 0.12), #1e293b) !important;
    border-color: #334155 !important;
}

body.dark-theme .learning-chapter-card strong {
    color: #f1f5f9 !important;
}

body.dark-theme .learning-chapter-card span {
    color: #94a3b8 !important;
}

body.dark-theme .learning-quiz-item {
    background: rgba(59, 130, 246, 0.08) !important;
    border-color: #334155 !important;
}

body.dark-theme .learning-quiz-item h4 {
    color: #f1f5f9 !important;
}

body.dark-theme .workflow-rail {
    background: linear-gradient(145deg, #1e293b, #0f172a) !important;
    border-color: #334155 !important;
}

body.dark-theme .workflow-step {
    background: linear-gradient(145deg, #1e293b, #0f172a) !important;
    border-color: #334155 !important;
}

body.dark-theme .workflow-label {
    color: #f1f5f9 !important;
}

body.dark-theme .workflow-hint {
    color: #94a3b8 !important;
}

body.dark-theme .section-title {
    color: #f1f5f9 !important;
}

body.dark-theme .analysis-disclaimer {
    background: rgba(59, 130, 246, 0.08) !important;
    border-color: rgba(59, 130, 246, 0.18) !important;
    color: #94a3b8 !important;
}

body.dark-theme .modal-content {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #f1f5f9 !important;
}

body.dark-theme .close {
    color: #94a3b8 !important;
}

body.dark-theme .auth-tab {
    color: #94a3b8 !important;
}

body.dark-theme .form-group label {
    color: #f1f5f9 !important;
}

body.dark-theme .verification-box {
    background: #1e293b !important;
    border-color: #334155 !important;
}

body.dark-theme .verification-box h2,
body.dark-theme .verification-box p {
    color: #f1f5f9 !important;
}

body.dark-theme .profile-info {
    background: rgba(59, 130, 246, 0.1) !important;
    border-color: #334155 !important;
}

body.dark-theme .profile-info p {
    background: #0f172a !important;
    color: #f1f5f9 !important;
}

body.dark-theme .profile-info strong {
    color: #f1f5f9 !important;
}

body.dark-theme .profile-info span {
    color: #94a3b8 !important;
}

body.dark-theme .exam-progress-text {
    color: #94a3b8 !important;
}

body.dark-theme .exam-timer-label {
    color: #94a3b8 !important;
}

body.dark-theme .exam-score-text {
    fill: #f1f5f9 !important;
}

body.dark-theme .exam-stat-item {
    background: #1e293b !important;
}

body.dark-theme .exam-stat-label {
    color: #94a3b8 !important;
}

body.dark-theme .exam-answer-review-item {
    background: #1e293b !important;
}

body.dark-theme .exam-review-q {
    color: #f1f5f9 !important;
}

body.dark-theme .exam-review-a {
    color: #94a3b8 !important;
}

body.dark-theme .stat {
    background: linear-gradient(145deg, #1e293b, #0f172a) !important;
}

body.dark-theme .history-date-row {
    background: linear-gradient(145deg, #1e293b, #0f172a) !important;
}

body.dark-theme .history-date {
    color: #f1f5f9 !important;
}

body.dark-theme .history-count {
    color: #94a3b8 !important;
}

/* =====================================================
   ULTIMATE DARK THEME OVERRIDE - Catch All Colors
   �������������� ��� ���������� �����
   ===================================================== */
body.dark-theme,
body.dark-theme * {
    /* �������������� ����� � :root ��� dark ������ */
    --text-primary: #f1f5f9 !important;
    --text-secondary: #94a3b8 !important;
    --border-color: #334155 !important;
    --surface-color: #1e293b !important;
    --surface-elevated: #1e293b !important;
}

/* Ƹ����� ��������������� ���� ������ ������ */
body.dark-theme,
body.dark-theme h1,
body.dark-theme h2,
body.dark-theme h3,
body.dark-theme h4,
body.dark-theme h5,
body.dark-theme h6,
body.dark-theme p,
body.dark-theme span,
body.dark-theme li,
body.dark-theme label,
body.dark-theme div,
body.dark-theme strong,
body.dark-theme em,
body.dark-theme i,
body.dark-theme td,
body.dark-theme th {
    color: #f1f5f9 !important;
}

/* ��������������� ���������� ���������� ������ */
body.dark-theme h1,
body.dark-theme h2,
body.dark-theme h3,
body.dark-theme .analysis h2,
body.dark-theme .questions-section h2,
body.dark-theme .metric-value {
    color: #f1f5f9 !important;
}

body.dark-theme .subtitle,
body.dark-theme p,
body.dark-theme .text-muted,
body.dark-theme .section-desc,
body.dark-theme .prepare-intro,
body.dark-theme .timing-adapt-hint,
body.dark-theme .metric-comment {
    color: #94a3b8 !important;
}

/* Input, textarea, select ����� */
body.dark-theme input[type="text"],
body.dark-theme input[type="number"],
body.dark-theme input[type="email"],
body.dark-theme input[type="password"],
body.dark-theme textarea,
body.dark-theme select {
    color: #f1f5f9 !important;
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

body.dark-theme input::placeholder,
body.dark-theme textarea::placeholder {
    color: #64748b !important;
}

/* a ���� */
body.dark-theme a {
    color: #60A5FA !important;
}

/* ������-������ �� ��������� ��������� (how-it-works � ��.) � �� ����������� ���������� ������� ������ ��������� */
body.dark-theme a.btn-how-primary {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff;
}

/* ������ */
body.dark-theme .btn-primary {
    background: linear-gradient(145deg, #60A5FA, #3B82F6) !important;
    color: white !important;
}

body.dark-theme .btn-secondary {
    background: linear-gradient(145deg, #334155, #1e293b) !important;
    color: #f1f5f9 !important;
    border-color: #334155 !important;
}

/* ���� */
body.dark-theme .tab {
    color: #94a3b8 !important;
}

body.dark-theme .tab.active {
    color: white !important;
}

/* �������� */
body.dark-theme .surface-card,
body.dark-theme .container {
    background: #1e293b !important;
    border-color: #334155 !important;
}

/* ������ */
body.dark-theme .modal-content {
    background: #1e293b !important;
    color: #f1f5f9 !important;
    border-color: #334155 !important;
}

/* ������� */
body.dark-theme table,
body.dark-theme td,
body.dark-theme th {
    border-color: #334155 !important;
}

/* �������������� ����������� ��� prepare-hero �������� */
body.dark-theme .prepare-hero h2 {
    color: #f1f5f9 !important;
}

body.dark-theme .prepare-hero .prepare-eyebrow {
    color: #60A5FA !important;
}

body.dark-theme .prepare-hero .prepare-intro {
    color: #94a3b8 !important;
}

body.dark-theme .prepare-hero p {
    color: #94a3b8 !important;
}

/* ����������� ��� ���� ������� � surface-card */
body.dark-theme .surface-card h2,
body.dark-theme .surface-card h3,
body.dark-theme .surface-card h4 {
    color: #f1f5f9 !important;
}

body.dark-theme .surface-card p {
    color: #94a3b8 !important;
}

/* ��������� ���� - ����������, ������� */
body.dark-theme .modal-content h2 {
    color: #f1f5f9 !important;
}

body.dark-theme .modal-content p {
    color: #94a3b8 !important;
}

body.dark-theme .modal-content .form-group label {
    color: #f1f5f9 !important;
}

body.dark-theme .payment-info p,
body.dark-theme .payment-info li {
    color: #94a3b8 !important;
}

/* Header/Navigation */
body.dark-theme .header-nav {
    background: rgba(30, 41, 59, 0.95) !important;
    border-bottom-color: #334155 !important;
}

body.dark-theme .logo .logo-heading {
    color: #f1f5f9 !important;
}

body.dark-theme .logo .logo-heading .logo-title {
    color: #f1f5f9 !important;
}

body.dark-theme .nav-btn {
    color: #f1f5f9 !important;
    border-color: #334155 !important;
    background: linear-gradient(145deg, #1e293b, #0f172a) !important;
}

/* ==================== EXAMS & CHALLENGES DARK THEME ==================== */

/* �������� */
body.dark-theme .exams-section h2 {
    color: #f1f5f9 !important;
}

body.dark-theme .exams-section p {
    color: #94a3b8 !important;
}

body.dark-theme .exam-settings {
    background: #1e293b !important;
    border-color: #334155 !important;
}

body.dark-theme .exam-settings .form-group label {
    color: #f1f5f9 !important;
}

body.dark-theme .exam-start-section {
    background: #1e293b !important;
    border-color: #334155 !important;
}

body.dark-theme .exam-progress {
    color: #94a3b8 !important;
}

body.dark-theme .exam-progress-text {
    color: #94a3b8 !important;
}

body.dark-theme .exam-progress-bar {
    background: #334155 !important;
}

body.dark-theme .exam-timer-section {
    background: linear-gradient(145deg, #1e293b, #0f172a) !important;
    border-color: #334155 !important;
}

body.dark-theme .exam-timer-label {
    color: #94a3b8 !important;
}

body.dark-theme .exam-timer {
    color: #60A5FA !important;
}

body.dark-theme .exam-timer.timer-warning {
    color: #ef4444 !important;
}

body.dark-theme .exam-question-box {
    background: linear-gradient(145deg, #1e293b, #0f172a) !important;
    border-color: #334155 !important;
}

body.dark-theme .exam-question-box h3 {
    color: #f1f5f9 !important;
}

body.dark-theme .exam-actions {
    background: transparent !important;
}

body.dark-theme .exam-answer-section {
    background: #1e293b !important;
    border-color: #334155 !important;
}

body.dark-theme .exam-answer-section textarea {
    background: #0f172a !important;
    color: #f1f5f9 !important;
    border-color: #334155 !important;
}

body.dark-theme .exam-results {
    background: #1e293b !important;
}

body.dark-theme .exam-results h2 {
    color: #f1f5f9 !important;
}

body.dark-theme .exam-score-circle .exam-score-text {
    fill: #f1f5f9 !important;
    color: #f1f5f9 !important;
}

body.dark-theme .exam-score-label {
    color: #94a3b8 !important;
}

body.dark-theme .exam-stats {
    background: transparent !important;
}

body.dark-theme .exam-stat-item {
    background: linear-gradient(145deg, #1e293b, #0f172a) !important;
    border-color: #334155 !important;
}

body.dark-theme .exam-stat-value {
    color: #60A5FA !important;
}

body.dark-theme .exam-stat-label {
    color: #94a3b8 !important;
}

body.dark-theme .exam-answers-review {
    background: #1e293b !important;
}

body.dark-theme .exam-answer-review-item {
    background: linear-gradient(145deg, #1e293b, #0f172a) !important;
    border-color: #334155 !important;
}

body.dark-theme .exam-review-q {
    color: #f1f5f9 !important;
}

body.dark-theme .exam-review-a {
    color: #94a3b8 !important;
}

/* ��������� */
body.dark-theme .challenges-section h2 {
    color: #f1f5f9 !important;
}

body.dark-theme .challenges-section p {
    color: #94a3b8 !important;
}

body.dark-theme .challenges-stats-bar {
    background: transparent !important;
}

body.dark-theme .challenge-stat {
    background: linear-gradient(145deg, #1e293b, #0f172a) !important;
    border-color: #334155 !important;
}

body.dark-theme .challenge-stat-number {
    color: #60A5FA !important;
}

body.dark-theme .challenge-stat-label {
    color: #94a3b8 !important;
}

body.dark-theme .today-challenge {
    background: linear-gradient(145deg, #1e293b, #0f172a) !important;
    border-color: #334155 !important;
}

body.dark-theme .today-challenge h3 {
    color: #f1f5f9 !important;
}

body.dark-theme .challenge-badge {
    background: linear-gradient(135deg, #60A5FA, #3B82F6) !important;
    color: white !important;
}

body.dark-theme .challenge-desc {
    color: #94a3b8 !important;
}

body.dark-theme #todayChallengeDesc {
    color: #94a3b8 !important;
}

body.dark-theme .challenge-progress-bar {
    background: #334155 !important;
}

body.dark-theme .challenge-progress-section span {
    color: #94a3b8 !important;
}

body.dark-theme .challenges-grid {
    background: transparent !important;
}

body.dark-theme .challenge-card {
    background: linear-gradient(145deg, #1e293b, #0f172a) !important;
    border-color: #334155 !important;
}

body.dark-theme .challenge-card h4 {
    color: #f1f5f9 !important;
}

body.dark-theme .challenge-card p {
    color: #94a3b8 !important;
}

body.dark-theme .challenge-card-type {
    background: rgba(59, 130, 246, 0.15) !important;
    color: #60A5FA !important;
}

body.dark-theme .challenges-history {
    background: #1e293b !important;
    border-color: #334155 !important;
}

body.dark-theme .challenges-history h3 {
    color: #f1f5f9 !important;
}

body.dark-theme .challenges-history-list {
    background: transparent !important;
}

body.dark-theme .history-date-row {
    background: linear-gradient(145deg, #1e293b, #0f172a) !important;
    border-color: #334155 !important;
}

body.dark-theme .history-date {
    color: #f1f5f9 !important;
}

body.dark-theme .history-count {
    color: #94a3b8 !important;
}

body.dark-theme .no-history {
    color: #94a3b8 !important;
}

/* ����� ����������� ��� ���� ������ */
body.dark-theme .exams-section,
body.dark-theme .challenges-section {
    background: transparent !important;
    color: #f1f5f9 !important;
}

/* ==================== ���������� �������� ��� DARK THEME ==================== */

/* ������ - ��������� �������� */
body.dark-theme .btn,
body.dark-theme .nav-btn,
body.dark-theme .auth-btn,
body.dark-theme .verification-btn {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

body.dark-theme .btn:hover,
body.dark-theme .nav-btn:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

body.dark-theme .btn-primary {
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3) !important;
}

body.dark-theme .btn-primary:hover {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4) !important;
}

/* �������� - ��������� ���� */
body.dark-theme .surface-card,
body.dark-theme .container {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

body.dark-theme .surface-card:hover,
body.dark-theme .container:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4) !important;
}

/* Hero ������ */
body.dark-theme .hero-glow {
    opacity: 0.3 !important;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.15) 0%, transparent 65%) !important;
}

/* ���������� */
body.dark-theme .stat {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

body.dark-theme .stat:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

/* Level �������� */
body.dark-theme .level-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

body.dark-theme .level-card.level-current {
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3) !important;
}

/* Hero feature card */
body.dark-theme .hero-feature-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

body.dark-theme .hero-feature-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

/* Metric card */
body.dark-theme .metric-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

body.dark-theme .metric-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

/* Workflow */
body.dark-theme .workflow-rail {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

body.dark-theme .workflow-step {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
}

body.dark-theme .workflow-step.is-active {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3) !important;
}

/* Timing chip */
body.dark-theme .timing-chip {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
}

body.dark-theme .timing-chip-active {
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3) !important;
}

/* Challenge card */
body.dark-theme .challenge-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

body.dark-theme .challenge-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

/* Modal */
body.dark-theme .modal-content {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
}

/* Verification box */
body.dark-theme .verification-box {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
}

/* Exam timer section */
body.dark-theme .exam-timer-section {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

/* Exam question box */
body.dark-theme .exam-question-box {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

/* Generated speech */
body.dark-theme .generated-speech {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

/* Timing adapt panel */
body.dark-theme .timing-adapt-panel {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

/* Outline panel */
body.dark-theme .outline-panel {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

/* Question card */
body.dark-theme .question-card {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
}

/* History section */
body.dark-theme .history-section {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

/* Reward item */
body.dark-theme .reward-item {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
}

/* Task item */
body.dark-theme .task-item {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
}

/* Progress container */
body.dark-theme .progress-container {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

/* Detailed analysis section */
body.dark-theme .detailed-analysis-section {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

/* Level info, levels container */
body.dark-theme .level-info,
body.dark-theme .levels-container,
body.dark-theme .level-rewards,
body.dark-theme .level-tasks {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

/* Learning chapter card */
body.dark-theme .learning-chapter-card {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
}

/* Learning quiz item */
body.dark-theme .learning-quiz-item {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
}

/* Recommendations section li */
body.dark-theme .recommendations-section li {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
}

body.dark-theme * {
    --shadow-clay: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
    --shadow-clay-hover: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

/* ==================== ���������� ƨ����/��������� ������ ==================== */
body.dark-theme .challenge-card-points {
    background: linear-gradient(135deg, #854d0e, #a16207) !important;
    color: #fef08a !important;
}

body.dark-theme .challenge-stat-number,
body.dark-theme .total-points,
body.dark-theme .streak-days {
    color: #fbbf24 !important;
}

body.dark-theme .exam-stat-value {
    color: #fbbf24 !important;
}

body.dark-theme .points-value,
body.dark-theme [class*="points"] {
    color: #fbbf24 !important;
}

body.dark-theme .level-progress-fill {
    background: linear-gradient(90deg, #60A5FA, #fbbf24) !important;
}

body.dark-theme .progress-fill {
    background: linear-gradient(90deg, #60A5FA, #fbbf24) !important;
}

body.dark-theme .challenge-progress-fill {
    background: linear-gradient(90deg, #60A5FA, #fbbf24) !important;
}

/* ==================== �������� ���������� ��������� DARK THEME ==================== */

/* Glassmorphism ������� */
body.dark-theme .surface-card,
body.dark-theme .container,
body.dark-theme .modal-content {
    background: rgba(30, 41, 59, 0.85) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
}

/* ����������� ������� */
body.dark-theme .surface-card {
    border: 1px solid rgba(96, 165, 250, 0.15) !important;
    border-radius: 20px !important;
}

body.dark-theme .surface-card::before {
    display: none !important;
}

/* Subtle neon glow ��� �������� ��������� */
body.dark-theme .btn-primary {
    background: linear-gradient(135deg, #3B82F6, #1d4ed8) !important;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3), 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(96, 165, 250, 0.3) !important;
}

body.dark-theme .btn-primary:hover {
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.5), 0 4px 12px rgba(0, 0, 0, 0.4) !important;
    transform: translateY(-2px) !important;
}

/* ��������� �������� � ���������� */
body.dark-theme .tab.active {
    background: linear-gradient(135deg, #3B82F6, #1d4ed8) !important;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4) !important;
    border: 1px solid rgba(96, 165, 250, 0.4) !important;
}

/* Timing chip �������� � glow */
body.dark-theme .timing-chip-active {
    background: linear-gradient(135deg, #3B82F6, #1d4ed8) !important;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.4), 0 2px 6px rgba(0, 0, 0, 0.2) !important;
    border: 1px solid rgba(96, 165, 250, 0.4) !important;
}

/* Level card ������� ������� */
body.dark-theme .level-card.level-current {
    border: 1px solid rgba(96, 165, 250, 0.5) !important;
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.4), 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

/* Smooth transitions */
body.dark-theme .surface-card,
body.dark-theme .btn,
body.dark-theme .tab,
body.dark-theme .metric-card,
body.dark-theme .hero-feature-card,
body.dark-theme .challenge-card,
body.dark-theme .level-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Hover ������� � lift */
body.dark-theme .surface-card:hover,
body.dark-theme .metric-card:hover,
body.dark-theme .hero-feature-card:hover,
body.dark-theme .challenge-card:hover {
    transform: translateY(-4px) !important;
    border-color: rgba(96, 165, 250, 0.3) !important;
}

/* Workflow step �������� � glow */
body.dark-theme .workflow-step.is-active {
    border: 1px solid rgba(96, 165, 250, 0.5) !important;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3), 0 4px 10px rgba(0, 0, 0, 0.3) !important;
    background: linear-gradient(145deg, #1e293b, #0f172a) !important;
}

/* Hero ������ � ����������� ��������� */
body.dark-theme .hero-glow {
    background: radial-gradient(ellipse at center top, rgba(59, 130, 246, 0.15) 0%, transparent 60%) !important;
}

/* Stats � border glow */
body.dark-theme .stat {
    border: 1px solid rgba(96, 165, 250, 0.15) !important;
}

body.dark-theme .stat:hover {
    border-color: rgba(96, 165, 250, 0.35) !important;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2) !important;
}

/* Exam timer � ���������� */
body.dark-theme .exam-timer {
    text-shadow: 0 0 10px rgba(96, 165, 250, 0.5) !important;
}

body.dark-theme .exam-timer.timer-warning {
    text-shadow: 0 0 15px rgba(239, 68, 68, 0.7) !important;
}

/* Score circle � glow */
body.dark-theme .score-circle {
    filter: drop-shadow(0 0 15px rgba(59, 130, 246, 0.3)) !important;
}

body.dark-theme .exam-score-circle {
    filter: drop-shadow(0 0 15px rgba(59, 130, 246, 0.3)) !important;
}

/* Input fields � border glow */
body.dark-theme input:focus,
body.dark-theme textarea:focus,
body.dark-theme select:focus {
    border-color: rgba(96, 165, 250, 0.5) !important;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.2), inset 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    outline: none !important;
}

/* Question card � subtle glow */
body.dark-theme .question-card {
    border: 1px solid rgba(96, 165, 250, 0.1) !important;
}

body.dark-theme .question-card:hover {
    border-color: rgba(96, 165, 250, 0.3) !important;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.15) !important;
}

/* History items */
body.dark-theme .history-item {
    border: 1px solid rgba(96, 165, 250, 0.1) !important;
}

body.dark-theme .history-item:hover {
    border-color: rgba(96, 165, 250, 0.3) !important;
    background: rgba(30, 41, 59, 0.8) !important;
}

/* Modal � backdrop blur */
body.dark-theme .modal {
    background: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(4px) !important;
}

body.dark-theme .modal-content {
    border: 1px solid rgba(96, 165, 250, 0.2) !important;
}

/* Challenge card badges */
body.dark-theme .challenge-badge {
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.4) !important;
}

/* Progress bars � gradient � glow */
body.dark-theme .progress-bar,
body.dark-theme .level-progress-bar {
    background: rgba(51, 65, 85, 0.8) !important;
    border: 1px solid rgba(96, 165, 250, 0.15) !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

/* Recommendations � bullet glow */
body.dark-theme .recommendations-section li {
    border-left: 3px solid rgba(96, 165, 250, 0.5) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

body.dark-theme .recommendations-section li:hover {
    border-left-color: rgba(96, 165, 250, 0.8) !important;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.2) !important;
}

/* Animations */
@keyframes darkThemePulse {
    0%, 100% { box-shadow: 0 0 20px rgba(59, 130, 246, 0.3); }
    50% { box-shadow: 0 0 30px rgba(59, 130, 246, 0.5); }
}

body.dark-theme .btn-primary:active {
    animation: darkThemePulse 0.3s ease-in-out !important;
}

/* Text selection color */
body.dark-theme ::selection {
    background: rgba(59, 130, 246, 0.4) !important;
    color: #f1f5f9 !important;
}

body.dark-theme ::-moz-selection {
    background: rgba(59, 130, 246, 0.4) !important;
    color: #f1f5f9 !important;
}

/* Scrollbar styling */
body.dark-theme ::-webkit-scrollbar {
    width: 8px !important;
    height: 8px !important;
}

body.dark-theme ::-webkit-scrollbar-track {
    background: #0f172a !important;
}

body.dark-theme ::-webkit-scrollbar-thumb {
    background: #334155 !important;
    border-radius: 4px !important;
}

body.dark-theme ::-webkit-scrollbar-thumb:hover {
    background: #475569 !important;
}

/* ==================== SMOOTH ANIMATIONS FOR LIGHTFEEL ==================== */

/* Page load animations */
@keyframes pageLoad {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px);
    }
}

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

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

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(59, 130, 246, 0.3); }
    50% { box-shadow: 0 0 30px rgba(59, 130, 246, 0.5); }
}

/* Apply page load animation */
.container,
.surface-card,
.tab-content {
    animation: pageLoad 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Staggered card animations */
.hero-feature-card:nth-child(1),
.metric-card:nth-child(1),
.challenge-card:nth-child(1),
.level-card:nth-child(1) { animation-delay: 0.05s; }

.hero-feature-card:nth-child(2),
.metric-card:nth-child(2),
.challenge-card:nth-child(2),
.level-card:nth-child(2) { animation-delay: 0.1s; }

.hero-feature-card:nth-child(3),
.metric-card:nth-child(3),
.challenge-card:nth-child(3),
.level-card:nth-child(3) { animation-delay: 0.15s; }

/* Smooth transitions - make everything feel light */
* {
    transition-property: transform, opacity, box-shadow, border-color, background-color, color;
    transition-duration: 0.2s;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Exclude certain elements from too-fast transitions */
button,
input,
textarea,
select {
    transition-duration: 0.3s;
}

/* Hover lift effect */
.surface-card:hover,
.metric-card:hover,
.hero-feature-card:hover,
.challenge-card:hover,
.level-card:hover {
    transform: translateY(-4px);
}

/* Button press effect */
.btn:active,
.nav-btn:active {
    transform: scale(0.97);
}

/* Tab switching animation */
.tab-content.active:not(.tab-content--locked) {
    animation: pageLoad 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Smooth modal animation */
.modal-content {
    animation: scaleIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Question cards stagger */
.question-card {
    animation: slideIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.question-card:nth-child(1) { animation-delay: 0.05s; }
.question-card:nth-child(2) { animation-delay: 0.1s; }
.question-card:nth-child(3) { animation-delay: 0.15s; }
.question-card:nth-child(4) { animation-delay: 0.2s; }
.question-card:nth-child(5) { animation-delay: 0.25s; }

/* History items */
.history-item {
    animation: slideIn 0.3s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

/* Workflow steps */
.workflow-step {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.workflow-step:hover {
    transform: translateY(-3px);
}

/* Progress bars smooth fill */
.progress-fill,
.level-progress-fill,
.exam-progress-fill,
.challenge-progress-fill {
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Timer smooth update */
.timer,
.exam-timer {
    transition: color 0.3s ease;
}

/* Input focus smooth */
input:focus,
textarea:focus,
select:focus {
    transition: all 0.25s ease;
}

/* Score circle animation */
.score-circle,
.exam-score-circle {
    animation: fadeIn 0.6s ease-out;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   ����������� ��������� ���������
   ============================================ */

/* === Header Mobile: one row, icons + compact logo; labels in .nav-btn-text hidden via rules below === */
@media (max-width: 600px) {
    .header-nav {
        padding: 8px 10px;
        min-width: 0;
        width: calc(100% - 16px);
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .nav-container {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        padding: 0 4px;
        flex-wrap: nowrap;
        min-width: 0;
    }
    
    .logo {
        min-width: 0;
        flex: 1 1 auto;
        overflow: hidden;
    }
    
    .logo .logo-heading {
        font-size: clamp(0.85rem, 3.5vw, 1.05rem);
        justify-content: flex-start;
        gap: 6px;
        min-width: 0;
    }
    
    .logo-title {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .logo-emoji {
        font-size: 1em;
        flex-shrink: 0;
    }
    
    .nav-buttons {
        display: flex;
        flex-wrap: nowrap;
        gap: 6px;
        justify-content: flex-end;
        width: auto;
        flex-shrink: 0;
        margin-left: 8px;
    }
    
    .header-nav .nav-btn {
        padding: 8px 10px;
        font-size: 0;
        flex: 0 0 auto;
        min-width: 40px;
        min-height: 40px;
        max-width: none;
        justify-content: center;
        gap: 0;
    }
    
    .header-nav .nav-btn .nav-btn-text {
        display: none !important;
    }
    
    .header-nav .nav-btn i {
        font-size: 1.05rem;
        margin: 0;
        display: block;
    }
    
    .header-nav .nav-btn .nav-theme-icon, .header-nav .nav-btn .nav-inline-icon {
        width: 20px;
        height: 20px;
        min-width: 20px;
        min-height: 20px;
        margin: 0;
        display: block;
    }
    
    .header-nav #profileBtn {
        max-width: none;
    }
}

/* === Container Mobile === */
@media (max-width: 600px) {
    .container {
        margin: 8px;
        padding: 16px;
        border-radius: 16px;
    }
    
    .container::before {
        height: 3px;
    }
}

/* === Hero Section Mobile === */
@media (max-width: 600px) {
    .hero-section {
        padding: 8px 0 4px;
        margin-bottom: 12px;
    }

    .hero-message-stack {
        gap: clamp(0.32rem, 1vh, 0.72rem);
    }

    .hero-section h1 {
        padding-block: 0;
        font-size: clamp(1.42rem, 5.2vw, 1.55rem);
        line-height: 1.14 !important;
        margin-bottom: 6px;
    }
    
    .hero-section .subtitle {
        font-size: clamp(1rem, 3.6vw, 1.12rem);
        margin-bottom: 6px;
        line-height: 1.45;
    }

    .hero-copy-fade-wrap {
        /* ���� ������� �� padding .container � ������ �������� ��� ������, ������ ���� ��� �������� */
        align-self: stretch;
        width: calc(100% + 24px);
        max-width: calc(100% + 24px);
        margin-inline: -12px;
        padding-left: max(4px, env(safe-area-inset-left, 0px));
        padding-right: max(4px, env(safe-area-inset-right, 0px));
        box-sizing: border-box;
    }
    
    .hero-badge {
        font-size: 0.72rem;
        padding: 0.25rem 0.7rem;
        margin-bottom: 0.45rem;
    }

    .hero-cta {
        padding-top: 0;
        margin-top: 6px;
    }

    .landing-testimonials {
        margin-top: 0.6rem;
    }

    .landing-testimonials__title {
        font-size: 1rem;
        margin-bottom: 0.4rem;
    }

    .landing-testimonials__card {
        height: 170px;
        padding: 0.75rem 1rem;
        gap: 0.4rem;
    }

    .landing-testimonials__quote {
        font-size: 0.92rem;
        line-height: 1.52;
    }
    
    .hero-features {
        gap: 10px;
        margin-top: 1.2rem;
    }
    
    .hero-feature-card {
        padding: 14px 16px;
    }
    
    .hero-feature-icon {
        font-size: 1.4rem;
    }
    
    .hero-feature-card strong {
        font-size: 0.95rem;
    }
    
    .hero-feature-card span:last-child {
        font-size: 0.8rem;
    }
}

/* ��������� ����� ��������: CTA ������� ��������� / ���� ��� �������� � ���� ������� ������ */
@media (max-width: 600px) and (max-height: 740px) {
    .hero-section {
        padding: 6px 0 2px;
        margin-bottom: 10px;
    }

    .hero-message-stack {
        gap: clamp(0.28rem, 0.9vh, 0.55rem);
    }

    .hero-section h1 {
        font-size: clamp(1.26rem, 5vw, 1.45rem);
        line-height: 1.12 !important;
        margin-bottom: 4px;
    }

    .hero-section .subtitle {
        font-size: clamp(0.92rem, 3.3vw, 1.05rem);
        line-height: 1.38;
        margin-bottom: 4px;
    }

    .hero-badge {
        font-size: 0.68rem;
        padding: 0.22rem 0.65rem;
        margin-bottom: 0.35rem;
    }

    .hero-cta {
        margin-top: 4px;
    }

    .landing-testimonials {
        margin-top: 0.45rem;
    }

    .landing-testimonials__title {
        font-size: 0.95rem;
        margin-bottom: 0.32rem;
    }

    .landing-testimonials__card {
        height: 160px;
        padding: 0.6rem 0.85rem;
        gap: 0.35rem;
    }

    .landing-testimonials__quote {
        font-size: 0.88rem;
        line-height: 1.45;
    }
}

/* === Stats Bar Mobile === */
@media (max-width: 600px) {
    .stats-bar {
        grid-template-columns: repeat(2, minmax(0, min(46vw, 248px)));
        justify-content: center;
        gap: 14px;
        margin: 22px auto 12px;
        max-width: 100%;
    }
    
    .stat {
        padding: 18px 14px;
    }
    
    .stat-number {
        font-size: 1.8em;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    .progress-bar {
        height: 6px;
        margin-top: 6px;
    }
}

/* === Tabs Mobile === */
@media (max-width: 600px) {
    .tabs-lead {
        font-size: 0.85rem;
        padding: 0 0.3rem;
        margin-bottom: 1rem;
    }
    
    .tabs {
        display: flex;
        gap: 6px;
        margin-bottom: 20px;
        padding-bottom: 0;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        border-bottom: none;
        background: linear-gradient(145deg, rgba(var(--primary-rgb), 0.05), transparent);
        border-radius: 12px;
        padding: 8px;
    }
    
    .tabs::-webkit-scrollbar {
        display: none;
    }
    
    .tab {
        padding: 10px 14px;
        font-size: 0.85rem;
        flex-shrink: 0;
        scroll-snap-align: start;
        border-radius: 10px;
        white-space: nowrap;
    }
    
    .tab .tab-icon {
        display: inline;
        opacity: 1;
        margin-right: 4px;
        font-size: 0.6em;
    }
}

/* === Workflow Rail Mobile === */
@media (max-width: 600px) {
    .workflow-rail {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 4px !important;
        padding: 8px 10px !important;
        margin-bottom: 10px !important;
        border-radius: 8px !important;
        overflow-x: auto !important;
    }
    
    .workflow-step {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 2px !important;
        padding: 4px 6px !important;
        text-align: center !important;
        min-width: 50px !important;
        flex: 1 1 0 !important;
        border-radius: 6px !important;
    }
    
    .workflow-num {
        width: 20px !important;
        height: 20px !important;
        font-size: 10px !important;
        margin-bottom: 0 !important;
        line-height: 20px !important;
    }
    
    .workflow-label {
        font-size: 9px !important;
        font-weight: 600 !important;
        white-space: nowrap !important;
    }
    
    .workflow-hint {
        display: none !important;
    }
    
    .workflow-line {
        display: none !important;
    }
    
    /* ��� workflow--prepare ������� ��� ���������� */
    .workflow-rail--prepare {
        padding: 6px 8px !important;
    }
    
    .workflow-rail--prepare .workflow-step {
        min-width: 40px !important;
        padding: 4px !important;
    }
    
    .workflow-rail--prepare .workflow-num {
        width: 18px !important;
        height: 18px !important;
        font-size: 9px !important;
    }
    
    .workflow-rail--prepare .workflow-label {
        font-size: 8px !important;
    }
    
    /* ���������� �������������� workflow ��� ���� */
    #workflowPractice.workflow-rail,
    #workflowPrepare.workflow-rail {
        flex-direction: row !important;
        justify-content: space-around !important;
        align-items: center !important;
        gap: 2px !important;
        padding: 6px 8px !important;
        margin-bottom: 8px !important;
    }
    
    #workflowPractice .workflow-step,
    #workflowPrepare .workflow-step {
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 4px 2px !important;
        min-width: 35px !important;
        flex: 1 1 0 !important;
    }
    
    #workflowPractice .workflow-num,
    #workflowPrepare .workflow-num {
        width: 18px !important;
        height: 18px !important;
        font-size: 9px !important;
        line-height: 18px !important;
        margin-bottom: 0 !important;
    }
    
    #workflowPractice .workflow-label,
    #workflowPrepare .workflow-label {
        font-size: 7px !important;
        font-weight: 700 !important;
        line-height: 1.1 !important;
    }
    
    #workflowPractice .workflow-hint,
    #workflowPrepare .workflow-hint {
        display: none !important;
    }
    
    #workflowPractice .workflow-line,
    #workflowPrepare .workflow-line {
        display: none !important;
    }
}

/* === Surface Cards Mobile === */
@media (max-width: 600px) {
    .surface-card {
        padding: 10px 12px !important;
        margin-bottom: 8px !important;
        border-radius: 10px !important;
    }
    
    .section-head {
        flex-direction: row !important;
        gap: 8px !important;
        margin-bottom: 6px !important;
        padding-bottom: 6px !important;
        align-items: flex-start !important;
    }
    
    .section-step-num {
        font-size: 18px !important;
        flex-shrink: 0 !important;
    }
    
    .section-head-text {
        min-width: 0 !important;
    }
    
    .section-title {
        font-size: 0.98rem !important;
        margin-bottom: 2px !important;
    }
    
    .section-desc {
        font-size: 0.76rem !important;
        line-height: 1.38 !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }
    
    /* ������ ������ surface-card */
    .scenario-section,
    .speech-text-section {
        margin-bottom: 8px !important;
    }
    
    .scenario-section label,
    .speech-text-section label {
        font-size: 0.75rem !important;
        margin-bottom: 4px !important;
        font-weight: 600 !important;
    }
    
    .scenario-section select,
    .speech-text-section select,
    .scenario-section textarea,
    .speech-text-section textarea {
        padding: 8px 10px !important;
        font-size: 13px !important;
        border-radius: 8px !important;
        min-height: 50px !important;
    }
    
    .textarea-meta {
        font-size: 0.65rem !important;
        margin-top: 4px !important;
    }
    
    .textarea-actions {
        gap: 4px !important;
        margin-top: 6px !important;
    }
    
    .checkbox-row {
        font-size: 0.7rem !important;
        line-height: 1.3 !important;
    }
    
    .checkbox-row input {
        width: 16px !important;
        height: 16px !important;
        flex-shrink: 0 !important;
    }
    
    /* ����������� ���������� - �������������� */
    #practiceTab .surface-card {
        padding: 8px 10px !important;
        margin-bottom: 6px !important;
        border-radius: 8px !important;
    }
    
    #practiceTab .section-head {
        margin-bottom: 4px !important;
        padding-bottom: 4px !important;
        gap: 6px !important;
    }
    
    #practiceTab .section-step-num {
        font-size: 14px !important;
    }
    
    #practiceTab .surface-card .section-title {
        font-size: 0.98rem !important;
        line-height: 1.28 !important;
        font-weight: 800 !important;
    }
    
    #practiceTab .section-desc {
        display: none !important;
    }
    
    #practiceTab .scenario-section,
    #practiceTab .speech-text-section {
        margin-bottom: 6px !important;
    }
    
    #practiceTab label {
        font-size: 0.7rem !important;
        margin-bottom: 2px !important;
    }
    
    #practiceTab select,
    #practiceTab textarea {
        padding: 6px 8px !important;
        font-size: 12px !important;
        border-radius: 6px !important;
    }
    
    #practiceTab textarea {
        min-height: 40px !important;
    }
    
    #practiceTab .btn {
        padding: 8px 12px !important;
        font-size: 11px !important;
        border-radius: 6px !important;
    }
    
    #practiceTab .btn-small {
        padding: 6px 8px !important;
        font-size: 10px !important;
    }
    
    #practiceTab .textarea-actions {
        flex-wrap: wrap !important;
    }
    
    #practiceTab .textarea-actions .btn-small {
        flex: 1 1 auto !important;
        min-width: calc(50% - 4px) !important;
    }
    
    /* ��������� �� �� ����� �� ���� �������� */
    #prepareTab .surface-card,
    #examsTab .surface-card,
    #challengesTab .surface-card,
    #learningTab .surface-card,
    #dashboardTab .surface-card {
        padding: 8px 10px !important;
        margin-bottom: 6px !important;
        border-radius: 8px !important;
    }
    
    #prepareTab .section-head,
    #examsTab .section-head,
    #challengesTab .section-head,
    #learningTab .section-head,
    #dashboardTab .section-head {
        margin-bottom: 4px !important;
        padding-bottom: 4px !important;
        gap: 6px !important;
    }
    
    #prepareTab .section-step-num,
    #examsTab .section-step-num,
    #challengesTab .section-step-num,
    #learningTab .section-step-num,
    #dashboardTab .section-step-num {
        font-size: 14px !important;
    }
    
    #prepareTab .surface-card .section-title,
    #examsTab .surface-card .section-title,
    #challengesTab .surface-card .section-title,
    #learningTab .surface-card .section-title,
    #dashboardTab .surface-card .section-title {
        font-size: 0.98rem !important;
        line-height: 1.28 !important;
        font-weight: 800 !important;
    }
    
    #prepareTab .section-desc,
    #examsTab .section-desc,
    #challengesTab .section-desc,
    #learningTab .section-desc,
    #dashboardTab .section-desc {
        display: none !important;
    }
    
    #prepareTab label,
    #examsTab label,
    #challengesTab label,
    #learningTab label,
    #dashboardTab label {
        font-size: 0.7rem !important;
        margin-bottom: 2px !important;
    }
    
    #prepareTab select,
    #prepareTab textarea,
    #examsTab select,
    #examsTab textarea,
    #challengesTab select,
    #challengesTab textarea,
    #learningTab select,
    #learningTab textarea,
    #dashboardTab select,
    #dashboardTab textarea {
        padding: 6px 8px !important;
        font-size: 12px !important;
        border-radius: 6px !important;
    }
    
    #prepareTab textarea,
    #examsTab textarea,
    #challengesTab textarea,
    #learningTab textarea,
    #dashboardTab textarea {
        min-height: 40px !important;
    }
    
    #prepareTab .btn,
    #examsTab .btn,
    #challengesTab .btn,
    #learningTab .btn,
    #dashboardTab .btn {
        padding: 8px 12px !important;
        font-size: 11px !important;
        border-radius: 6px !important;
    }
    
    #prepareTab .btn-small,
    #examsTab .btn-small,
    #challengesTab .btn-small,
    #learningTab .btn-small,
    #dashboardTab .btn-small {
        padding: 6px 8px !important;
        font-size: 10px !important;
    }
    
    /* ����� ��� ������ �������� � ������ */
    #prepareTab .scenario-section,
    #prepareTab .speech-text-section,
    #examsTab .scenario-section,
    #examsTab .speech-text-section,
    #challengesTab .scenario-section,
    #challengesTab .speech-text-section,
    #learningTab .scenario-section,
    #learningTab .speech-text-section,
    #dashboardTab .scenario-section,
    #dashboardTab .speech-text-section {
        margin-bottom: 6px !important;
    }
    
    /* ����� ��� textarea-actions */
    #prepareTab .textarea-actions,
    #examsTab .textarea-actions,
    #challengesTab .textarea-actions,
    #learningTab .textarea-actions,
    #dashboardTab .textarea-actions {
        flex-wrap: wrap !important;
    }
    
    #prepareTab .textarea-actions .btn-small,
    #examsTab .textarea-actions .btn-small,
    #challengesTab .textarea-actions .btn-small,
    #learningTab .textarea-actions .btn-small,
    #dashboardTab .textarea-actions .btn-small {
        flex: 1 1 auto !important;
        min-width: calc(50% - 4px) !important;
    }
}
    
    .section-title {
        font-size: 1rem;
    }
    
    .section-desc {
        font-size: 0.8rem;
        line-height: 1.4;
    }
    
    /* ���������� �������� ��� ���������, �����, ������� */
    .surface-card .form-group {
        margin-bottom: 10px;
    }
    
    .surface-card label {
        font-size: 0.85rem;
        margin-bottom: 4px;
    }
    
    .surface-card select,
    .surface-card input[type="text"],
    .surface-card input[type="number"],
    .surface-card textarea {
        padding: 10px 12px;
        font-size: 14px;
        border-radius: 10px;
    }
    
    .surface-card textarea {
        min-height: 70px;
    }
    
    /* ���������� ������ ���������� */
    .surface-card .form-group:has(input[type="text"]) {
        margin-bottom: 8px;
    }
    
    .surface-card .form-group:has(input[type="number"]) {
        margin-bottom: 8px;
    }
    
    .surface-card .form-group:has(select) {
        margin-bottom: 8px;
    }
    
    /* ���������� timing panel */
    .timing-adapt-panel {
        padding: 12px 14px;
        margin: 12px 0;
    }
    
    .timing-adapt-title {
        font-size: 0.95rem;
        margin-bottom: 6px;
    }
    
    .timing-adapt-hint {
        font-size: 0.8rem;
        line-height: 1.4;
        margin-bottom: 10px;
    }
    
    .timing-presets {
        gap: 6px;
        margin-bottom: 10px;
    }
    
    .timing-chip {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .timing-range-row {
        margin-bottom: 8px;
    }
    
    .timing-range-row label {
        font-size: 0.8rem;
    }
    
    .timing-adapt-actions {
        margin-top: 8px;
    }
    
    .timing-adapt-actions .btn {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    /* ���������� ������ � surface-card */
    .surface-card .btn {
        padding: 12px 16px;
        font-size: 13px;
    }
    
    .surface-card .btn-small {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    /* ����������: ����������� ��������-����� ��� ��������� */
    .surface-card:has(.form-group:first-child input[type="text"]) {
        padding: 12px 14px;
    }
    
    /* ����������: ���������� ��������� ������ */
    .surface-card .section-head {
        min-height: auto;
        padding-bottom: 8px;
    }
    
    .surface-card .section-head-text {
        min-height: auto;
    }
    
    /* ����������: ����� ������� ������ ��� ��������� */
    .surface-card {
        background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
        box-shadow: 0 2px 8px rgba(59, 130, 246, 0.08);
        border: 1px solid rgba(59, 130, 246, 0.1);
    }
    
    .surface-card:hover {
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.12);
    }
    
    .dark-theme .surface-card {
        background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        border-color: rgba(96, 165, 250, 0.1);
    }
    
    /* ����������: ��������������� ������ */
    .surface-card input,
    .surface-card select,
    .surface-card textarea {
        background: #fff;
        border: 1px solid rgba(59, 130, 246, 0.2);
        box-shadow: none;
    }
    
    .dark-theme .surface-card input,
    .dark-theme .surface-card select,
    .dark-theme .surface-card textarea {
        background: #0f172a;
        border-color: rgba(96, 165, 250, 0.2);
    }
    
    /* ����������: ���������� ������ ������ */
    .surface-card .button-group {
        margin: 12px 0 8px;
        gap: 8px;
    }
    
    .surface-card .button-group .btn {
        flex: 1 1 auto;
        min-width: calc(50% - 4px);
    }

    #prepareTab .surface-card .button-group .btn {
        flex: unset !important;
        min-width: 0 !important;
    }
    
    /* ����������: ���������� ���� � prepare � ������ ������� ��� � FAQ */
    #prepareTab .surface-card {
        max-width: var(--vb-main-content-max-width);
        margin-left: auto;
        margin-right: auto;
    }

    #prepareTab .timing-adapt-panel {
        max-width: var(--vb-main-content-max-width);
        margin-left: auto;
        margin-right: auto;
    }

    #prepareTab .btn {
        padding: 10px 14px !important;
        font-size: 13px !important;
        border-radius: var(--border-radius) !important;
    }

    #prepareTab .btn-small {
        padding: 8px 12px !important;
        font-size: 12px !important;
    }

    /* �� �������������� ���������� .btn-row � �������� ������ ������ �� ��������� @media */

    #prepareTab .surface-card .btn-row > .btn {
        min-width: 0;
    }

    #prepareTab .surface-card > .button-group {
        gap: 8px !important;
    }

    #prepareTab .section-desc {
        font-size: 0.82rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    /* ����������: �����-�������� � timing */
    .timing-presets {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    
    .timing-chip {
        font-size: 11px;
        padding: 6px 10px;
        text-align: center;
    }
    
    /* ����������: ��������������� timeline/wireframe ����� */
    .workflow-rail {
        background: transparent;
        border: 1px dashed rgba(59, 130, 246, 0.2);
        box-shadow: none;
        padding: 10px;
    }
    
    .workflow-step {
        background: rgba(59, 130, 246, 0.05);
        border: 1px solid rgba(59, 130, 246, 0.1);
    }
    
    .workflow-step.is-active {
        background: rgba(59, 130, 246, 0.1);
    }
    
    /* === ���������� ������� ��� ��������� === */
    
    /* ����������: ��������-����� ������ ������� ������ */
    @media (max-width: 480px) {
        /* ���������� ������� �������� � ���������� ����� */
        #prepareTab .surface-card,
        #practiceTab .surface-card {
            max-width: var(--vb-main-content-max-width);
            margin-left: auto;
            margin-right: auto;
        }
        
        /* ���������� ��������� � ������� */
        .surface-card .section-head {
            padding: 6px 0;
            margin-bottom: 8px;
            gap: 6px;
        }
        
        .surface-card .section-step-num {
            font-size: 16px;
            font-weight: 900;
            background: linear-gradient(135deg, #3b82f6, #1d4ed8);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        
        .surface-card .section-title {
            font-size: 0.98rem !important;
            font-weight: 800 !important;
            line-height: 1.28 !important;
        }
        
        .surface-card .section-desc {
            font-size: 0.7rem;
            color: #64748b;
            display: none;
        }
        
        /* �������� �������� ��� �������� ����� */
        .surface-card .section-desc {
            display: -webkit-box;
            -webkit-line-clamp: 1;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        
        /* ���������� ������ */
        .surface-card .form-group {
            margin-bottom: 6px;
        }
        
        .surface-card label {
            font-size: 0.75rem;
            font-weight: 600;
            color: #475569;
            display: block;
            margin-bottom: 3px;
        }
        
        .surface-card input,
        .surface-card select,
        .surface-card textarea {
            padding: 8px 10px;
            font-size: 13px;
            border-radius: 8px;
            border: 1px solid #e2e8f0;
            background: #fff;
        }
        
        .surface-card textarea {
            min-height: 60px;
        }
        
        /* ���������� ������ */
        .surface-card .btn {
            padding: 10px 14px;
            font-size: 12px;
            border-radius: 8px;
            margin: 4px 2px;
        }
        
        .surface-card .button-group {
            margin: 8px 0 4px;
            gap: 6px;
        }
        
        .surface-card .button-group .btn {
            flex: 1 1 auto;
            min-width: auto;
            padding: 8px 10px;
            font-size: 11px;
        }
        
        /* ���������� timing panel */
        .timing-adapt-panel {
            padding: 10px 12px;
            margin: 8px 0;
            border-radius: 10px;
        }
        
        .timing-adapt-title {
            font-size: 0.85rem;
            font-weight: 700;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        
        .timing-adapt-ico {
            font-size: 1rem;
        }
        
        .timing-adapt-hint {
            font-size: 0.7rem;
            margin-bottom: 8px;
            display: none;
        }
        
        .timing-presets {
            display: flex;
            gap: 4px;
            flex-wrap: wrap;
            margin-bottom: 8px;
        }
        
        .timing-chip {
            padding: 6px 8px;
            font-size: 10px;
            border-radius: 6px;
            flex: 1 1 auto;
            text-align: center;
            min-width: 60px;
        }
        
        .timing-range-row {
            margin-bottom: 6px;
        }
        
        .timing-range-row label {
            font-size: 0.7rem;
            display: flex;
            justify-content: space-between;
        }
        
        .timing-adapt-actions .btn {
            width: 100%;
            padding: 10px;
            font-size: 12px;
        }
        
        /* ����������: �����-������ ��� ������ */
        .surface-card .btn i {
            font-size: 0.8em;
        }
        
        /* ����������: progress bar ���� */
        .surface-card .progress-bar {
            height: 4px;
            margin-top: 6px;
        }
        
        /* ����������: ������� ������ */
        .surface-card {
            box-shadow: none;
            border: 1px solid #e2e8f0;
        }
        
        .dark-theme .surface-card {
            border-color: #334155;
            background: #1e293b;
        }
    }
    
    /* ����������: ���������� ����� ��� ����� ��������� */
    @media (max-width: 360px) {
        /* ��� ����� ���������� �������� */
        .surface-card {
            padding: 8px 10px;
        }
        
        .surface-card .section-step-num {
            font-size: 14px;
        }
        
        .surface-card .section-title {
            font-size: 0.98rem !important;
            font-weight: 800 !important;
            line-height: 1.28 !important;
        }
        
        .surface-card label {
            font-size: 0.7rem;
        }
        
        .surface-card input,
        .surface-card select,
        .surface-card textarea {
            padding: 6px 8px;
            font-size: 12px;
        }
        
        .surface-card .btn {
            padding: 8px 10px;
            font-size: 11px;
        }
        
        .timing-chip {
            padding: 5px 6px;
            font-size: 9px;
            min-width: 50px;
        }
    }

/* === Forms Mobile === */
@media (max-width: 600px) {
    .form-group {
        margin-bottom: 14px;
    }
    
    label {
        font-size: 0.9rem;
        margin-bottom: 6px;
    }
    
    select, 
    input[type="text"], 
    input[type="number"], 
    input[type="email"], 
    input[type="password"], 
    textarea {
        padding: 12px 14px;
        font-size: 15px;
        border-radius: 12px;
    }
    
    textarea {
        min-height: 80px;
    }
    
    textarea,
    input[type="text"] {
        -webkit-appearance: none;
        appearance: none;
    }
    
    .checkbox-row {
        font-size: 0.85rem;
        flex-direction: row;
        align-items: center;
    }
    
    .textarea-meta {
        font-size: 0.75rem;
    }
}

/* === Buttons Mobile === */
@media (max-width: 600px) {
    .btn {
        padding: 14px 20px;
        font-size: 15px;
        margin: 6px 0;
        width: 100%;
        min-height: 48px;
        border-radius: 12px;
    }
    
    .btn-small {
        padding: 10px 14px;
        font-size: 13px;
        min-height: 36px;
    }
    
    .button-group {
        flex-direction: column;
        gap: 8px;
        margin: 14px 0;
    }
    
    .button-group .btn {
        width: 100%;
    }
    
    .textarea-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .textarea-actions .btn {
        width: 100%;
    }
}

/* === Recording Section Mobile === */
@media (max-width: 600px) {
    .recording-section {
        margin: 20px 0;
        padding: 16px;
    }
    
    .recording-section .btn {
        width: 100%;
        margin: 6px 0;
    }
    
    .timer {
        font-size: 1.6em;
        margin-top: 8px;
    }
    
    .recording-vu {
        margin-top: 10px;
    }
    
    .recording-vu-track {
        height: 6px;
    }
}

/* === Analysis Section Mobile === */
@media (max-width: 600px) {
    .analysis {
        margin-top: 24px;
        padding: 16px;
    }
    
    .analysis h2 {
        font-size: 1.3em;
        margin-bottom: 20px;
    }
    
    .score-circle svg {
        width: 120px;
        height: 120px;
    }
    
    .score-svg .score-text {
        font-size: 26px;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin: 20px 0;
    }
    
    .metric-card {
        padding: 16px;
    }
    
    .metric-icon {
        font-size: 1.8em;
    }
    
    .metric-title {
        font-size: 1rem;
    }
    
    .metric-value {
        font-size: 1.2em;
    }
    
    .charts-section {
        padding: 12px;
        margin: 20px 0;
        overflow-x: auto;
    }
    
    .charts-section canvas {
        max-width: 100%;
    }
}

/* === Questions Section Mobile === */
@media (max-width: 600px) {
    .questions-section {
        margin-top: 24px;
        padding: 16px;
    }
    
    .questions-section h2 {
        font-size: 1.2em;
    }
    
    .question-card {
        padding: 14px;
        margin: 10px 0;
    }
    
    .question-number {
        font-size: 0.85rem;
    }
    
    .question-text {
        font-size: 1em;
    }
    
    .question-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    /* ����������� �������: �� ����������� break-word/hyphens �� layout-������ ������� ������������������ */
    .question-actions .btn {
        width: 100%;
        max-width: 100%;
        flex: none;
        align-self: stretch;
        min-height: 46px;
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
        overflow-wrap: normal;
        word-break: normal;
        hyphens: none;
        -webkit-hyphens: none;
        padding: 11px 12px;
        font-size: 0.875rem;
    }
    
    .question-answer {
        padding: 8px 10px;
        font-size: 0.9rem;
    }
}

/* === History Section Mobile === */
@media (max-width: 600px) {
    /* ��� flex-grow � ��������� � ����� ������ ������ ������������� �� ������ �������� � ����� �������� �� ������ */
    #practiceTab .history-section.surface-card,
    .history-section.surface-card {
        margin-top: 10px !important;
        margin-bottom: 4px !important;
        padding: 7px 8px 9px !important;
    }

    .history-section {
        margin-top: 10px;
        padding: 7px 8px 9px;
    }

    .history-head {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 7px;
        min-height: 0;
    }

    .history-collapse-toggle {
        flex: 0 0 auto;
        width: 100%;
        min-height: 0;
        padding: 0 2px 0 0;
    }

    .history-collapse-title {
        font-size: 0.95rem;
        line-height: 1.2;
    }

    .history-count-badge {
        font-size: 0.76rem;
    }

    .history-head-actions {
        width: 100%;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: stretch;
        gap: 7px;
    }

    .history-head-actions .btn {
        flex: 1 1 0;
        width: auto;
        min-width: 0;
        padding: 7px 8px;
        font-size: 0.78rem;
        line-height: 1.25;
    }
    
    .history-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .history-meta {
        grid-column: auto;
    }

    .history-list-panel {
        margin-top: 8px;
        padding-top: 8px;
    }
}

/* === Prepare Tab Mobile === */
@media (max-width: 600px) {
    .prepare-hero {
        padding: 1rem 0 0.5rem;
    }
    
    .prepare-eyebrow {
        font-size: 0.65rem;
    }
    
    .prepare-hero h2 {
        font-size: 1.3rem;
    }
    
    .prepare-intro {
        font-size: 0.9rem;
    }
    
    .timing-adapt-panel {
        padding: 1rem 1.2rem;
    }
    
    .timing-adapt-title {
        font-size: 1.1rem;
    }
    
    .timing-presets {
        gap: 6px;
    }
    
    .timing-chip {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    .timing-range-row {
        margin-bottom: 0.8rem;
    }
    
    .timing-range-row label {
        font-size: 0.85rem;
    }
    
    .timing-adapt-actions .btn {
        width: 100%;
    }
    
    .generated-speech {
        padding: 16px;
    }
    
    .generated-speech h3 {
        font-size: 1.1rem;
    }
    
    .speech-output {
        padding: 14px;
        font-size: 0.9rem;
    }
    
    .speech-output-actions {
        flex-direction: column;
    }
    
    .speech-output-actions .btn {
        width: 100%;
    }
    
    .outline-panel {
        padding: 0.9rem 1rem;
    }
    
    .outline-panel-head {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
    
    .outline-segment-title {
        font-size: 0.95rem;
    }
}

/* === Exams Section Mobile === */
@media (max-width: 600px) {
    .exams-section {
        padding: 15px;
    }
    
    .exam-settings {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .exam-start-section {
        flex-direction: column;
    }
    
    .exam-start-section .btn {
        width: 100%;
    }
    
    .exam-session {
        padding: 16px;
        margin-top: 16px;
    }
    
    .exam-timer-section {
        padding: 14px;
        min-width: 100px;
    }
    
    .exam-timer {
        font-size: 36px;
    }
    
    .exam-question-box {
        padding: 16px;
        margin: 16px 0;
    }
    
    .exam-question-box h3 {
        font-size: 1rem;
    }
    
    .exam-actions {
        flex-direction: column;
    }
    
    .exam-actions .btn {
        width: 100%;
    }
    
    .exam-answer-section textarea {
        min-height: 80px;
    }
    
    .exam-results {
        padding: 16px;
    }
    
    .exam-results h2 {
        font-size: 1.2em;
    }
    
    .exam-score-circle svg {
        width: 130px;
        height: 130px;
    }
    
    .exam-score-svg .exam-score-text {
        font-size: 28px;
    }
    
    .exam-stats {
        gap: 16px;
    }
    
    .exam-stat-item {
        padding: 12px 16px;
    }
    
    .exam-stat-value {
        font-size: 22px;
    }
    
    .exam-answers-review {
        max-height: 200px;
    }
    
    .exam-answer-review-item {
        padding: 12px;
    }
}

/* === Challenges Section Mobile === */
@media (max-width: 600px) {
    .challenges-section {
        padding: 15px;
    }
    
    .challenges-stats-bar {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .challenge-stat {
        padding: 16px;
    }
    
    .challenge-stat-number {
        font-size: 28px;
    }
    
    .today-challenge {
        padding: 20px 16px;
    }
    
    .challenge-badge {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .today-challenge h3 {
        font-size: 1.2rem;
    }
    
    .challenge-desc {
        font-size: 0.9rem;
    }
    
    .challenge-progress-section {
        flex-direction: column;
        gap: 8px;
    }
    
    .challenge-progress-bar {
        width: 100%;
        max-width: none;
    }
    
    .challenges-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .challenge-card {
        padding: 16px;
    }
    
    .challenge-card h4 {
        font-size: 1rem;
    }
    
    .challenge-card p {
        font-size: 0.85rem;
    }
    
    .challenges-history {
        padding: 16px;
    }
    
    .history-date-row {
        padding: 10px 12px;
    }
}

/* === Learning Section Mobile === */
@media (max-width: 600px) {
    .learning-section {
        padding: 15px 12px;
    }
    
    .learning-chapters {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .learning-chapter-card {
        padding: 10px;
    }
    
    .learning-chapter-top {
        font-size: 0.65rem;
    }
    
    .learning-chapter-card strong {
        font-size: 0.9rem;
    }
    
    .learning-chapter-card span {
        font-size: 0.75rem;
    }

    .prepare-intro {
        max-width: 100%;
    }
    
    .learning-theory {
        font-size: 0.9rem;
    }
    
    .learning-quiz {
        gap: 10px;
    }
    
    .learning-quiz-item {
        padding: 10px;
    }
    
    .learning-quiz-item h4 {
        font-size: 0.95rem;
    }
    
    .level-info {
        padding: 16px;
    }
    
    .level-info h3 {
        font-size: 1.1rem;
    }
    
    .level-progress-bar {
        height: 10px;
    }
    
    .levels-container,
    .level-rewards,
    .level-tasks {
        padding: 16px;
    }
    
    .levels-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    
    .level-card {
        padding: 18px 16px;
        min-height: 200px;
    }
    
    .level-number {
        font-size: clamp(1.85rem, 7vw, 2.4rem);
    }
    
    .level-title {
        font-size: 0.85rem;
    }
    
    .rewards-list {
        grid-template-columns: 1fr;
    }
    
    .reward-item {
        padding: 14px;
    }
    
    .reward-icon {
        font-size: 2em;
    }
    
    .tasks-list {
        grid-template-columns: 1fr;
    }
    
    .task-item {
        padding: 16px;
    }
    
    .task-item h4 {
        font-size: 0.95rem;
    }
}

/* === Modals Mobile === */
@media (max-width: 600px) {
    .modal {
        padding: 10px;
        align-items: flex-end;
    }
    
    .modal-content {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 20px;
        border-radius: 20px 20px 0 0;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .modal-content.profile-modal-wide {
        max-height: 85vh;
    }

    .payment-modal-content {
        max-height: 88vh;
        overflow-y: auto;
    }
    
    .close {
        right: 12px;
        top: 10px;
        font-size: 24px;
    }
    
    .auth-tabs {
        margin-bottom: 16px;
    }
    
    .auth-tab {
        padding: 12px;
        font-size: 14px;
    }
    
    .form-group {
        margin-bottom: 14px;
    }
    
    .form-group label {
        font-size: 0.9rem;
    }
    
    .form-group input {
        padding: 12px 14px;
        font-size: 15px;
    }
    
    .auth-btn {
        padding: 14px;
        font-size: 15px;
    }
    
    .auth-switch {
        font-size: 0.9rem;
    }
    
    .captcha-group {
        padding: 10px;
    }
    
    .captcha-question {
        font-size: 0.9rem;
    }
    
    .profile-info {
        padding: 12px;
        margin: 14px 0;
    }
    
    .profile-info p {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 8px;
    }
    
    .profile-info strong {
        font-size: 0.85rem;
    }
    
    .profile-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .profile-actions .btn {
        width: 100%;
        min-width: unset;
    }
    
    .payment-info ul {
        padding-left: 18px;
    }
    
    .payment-info li {
        font-size: 0.9rem;
        margin-bottom: 6px;
    }
    
    .payment-actions {
        gap: 8px;
    }
    
    .payment-actions .btn {
        width: 100%;
        flex: 0 0 auto;
    }

    #paymentModal {
        padding: 10px !important;
        align-items: center !important;
    }

    #paymentModal .payment-modal-content {
        width: min(100%, 460px) !important;
        max-width: min(100%, 460px) !important;
        max-height: min(82dvh, 620px) !important;
        margin: 0 auto !important;
        padding: 18px 16px 16px !important;
        border-radius: 18px !important;
        clip-path: none !important;
    }

    #paymentModal .payment-actions {
        gap: 8px;
    }

    #paymentModal .payment-actions .btn {
        width: 100% !important;
        flex: 0 0 auto !important;
        min-height: 40px;
        padding: 10px 12px;
        border-radius: 12px !important;
    }
}

/* === Verification Overlay Mobile === */
@media (max-width: 600px) {
    .verification-overlay {
        padding: 16px;
    }
    
    .verification-box {
        padding: 24px 20px;
        border-radius: 20px;
    }
    
    .verification-icon {
        font-size: 3em;
        margin-bottom: 16px;
    }
    
    .verification-box h2 {
        font-size: 1.3em;
    }
    
    .verification-box p {
        font-size: 0.9rem;
    }
    
    .verification-btn {
        padding: 14px 24px;
        font-size: 15px;
        width: 100%;
    }
}

/* === Draft Notice Mobile === */
@media (max-width: 600px) {
    .draft-notice-wrap {
        flex-direction: column;
        gap: 8px;
    }
    
    .draft-notice {
        font-size: 0.85rem;
        padding: 0.6rem 0.8rem;
    }
    
    .draft-notice-wrap .btn {
        width: 100%;
    }
}

/* === Timers Mobile === */
@media (max-width: 600px) {
    .timer {
        font-size: 1.4em;
    }
    
    .exam-timer {
        font-size: 32px;
    }
}

/* === Inputs Touch Optimization === */
@media (max-width: 600px) {
    input:not([type="checkbox"]):not([type="radio"]), 
    textarea, 
    select {
        -webkit-appearance: none;
        appearance: none;
        font-size: 16px !important;
    }
    
    input[type="range"] {
        -webkit-appearance: none;
        width: 100%;
        height: 6px;
        background: var(--border-color);
        border-radius: 3px;
    }
    
    input[type="range"]::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 20px;
        height: 20px;
        background: var(--primary-color);
        border-radius: 50%;
        cursor: pointer;
    }
    
    select {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 12px center;
        padding-right: 36px;
    }
    
    .dark-theme select {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    }
}

/* === Hide non-essential elements on very small screens === */
@media (max-width: 380px) {
    .hero-glow {
        display: none;
    }
    
    .logo-title {
        font-size: 1em;
    }
    
    .stats-bar {
        grid-template-columns: repeat(2, minmax(0, min(44vw, 200px)));
        justify-content: center;
        gap: 12px;
    }
    
    .hero-feature-card span:last-child {
        display: none;
    }
    
    .timing-presets {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

/* === Design System Harmonization Layer (audit refactor) === */
:root {
    --ds-radius-card: var(--border-radius-lg);
    --ds-radius-modal: var(--border-radius-2xl);
    --ds-radius-control: var(--border-radius);
    --ds-radius-chip: 999px;
    --ds-space-card: 18px;
    --ds-space-modal: 24px;
    --ds-space-control-y: 12px;
    --ds-space-control-x: 14px;
    --ds-shadow-card: 0 10px 24px rgba(15, 23, 42, 0.08);
    --ds-shadow-card-hover: 0 14px 28px rgba(15, 23, 42, 0.11);
    --ds-shadow-modal: 0 20px 48px rgba(15, 23, 42, 0.18);
}

.surface-card,
.chart-card,
.summary-card,
.faq-item,
.profile-info p,
.profile-promo-card,
.profile-subscription-actions,
.profile-password-panel,
.profile-actions-panel,
.profile-danger-panel {
    border-radius: var(--ds-radius-card);
    box-shadow: var(--ds-shadow-card);
}

.surface-card:hover,
.chart-card:hover,
.summary-card:hover {
    box-shadow: var(--ds-shadow-card-hover);
}

.modal-content,
.instruction-modal-content,
.learning-theory-drawer__panel {
    border-radius: var(--ds-radius-modal);
    box-shadow: var(--ds-shadow-modal);
}

.btn,
.btn-secondary,
.btn-primary,
.btn-danger,
.btn-outline {
    border-radius: var(--ds-radius-control);
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
textarea,
select,
.form-group input {
    border-radius: var(--ds-radius-control);
    padding: var(--ds-space-control-y) var(--ds-space-control-x);
}

.insight-badge,
.stat-badge,
.profile-promo-badge,
.section-step-num {
    border-radius: var(--ds-radius-chip);
}

@media (max-width: 600px) {
    :root {
        --ds-radius-card: 16px;
        --ds-radius-modal: 20px;
        --ds-space-card: 14px;
        --ds-space-modal: 16px;
        --ds-space-control-y: 10px;
        --ds-space-control-x: 12px;
    }

    .surface-card,
    .chart-card,
    .summary-card,
    .faq-item {
        padding: var(--ds-space-card);
    }

    .modal-content,
    .instruction-modal-content {
        padding: var(--ds-space-modal);
    }

    .profile-actions-row {
        gap: 8px;
    }
}

/* �� ��������: iOS Safari ��� ������ ����������� �������, ���� ����� ���� < 16px */
@media (max-width: 768px) {
    #speechText,
    #prepareSpeechText,
    #uploadText,
    .speech-text-section textarea,
    .exam-answer-section textarea,
    input[type='text'],
    input[type='number'],
    input[type='email'],
    input[type='password'],
    textarea,
    select {
        font-size: 16px !important;
        line-height: 1.45 !important;
    }
}

@media (max-width: 600px) {
    /* Keep mobile buttons visually rounded like desktop */
    .btn,
    .btn-primary,
    .btn-secondary,
    .btn-danger,
    .btn-outline,
    .chart-toggle-btn,
    .history-open-btn {
        border-radius: 14px !important;
        min-height: 42px;
    }

    .btn-small {
        border-radius: 12px !important;
    }

    .btn-row {
        gap: 8px !important;
    }

    .btn-row .btn {
        min-height: 42px;
    }
}

/* Final mobile overrides: compact payment + better profile close position */
@media (max-width: 600px) {
    #paymentModal {
        padding: 12px !important;
        align-items: center !important;
    }

    #paymentModal .payment-modal-content {
        width: calc(100vw - 24px) !important;
        max-width: 420px !important;
        max-height: min(78dvh, 560px) !important;
        padding: 14px 12px 12px !important;
        border-radius: 16px !important;
    }

    #paymentModal .payment-actions {
        gap: 6px !important;
        margin-top: 12px !important;
    }

    #paymentModal .payment-actions .btn {
        flex: 0 0 auto !important;
        min-height: 34px !important;
        padding: 7px 12px !important;
        font-size: 0.85rem !important;
        line-height: 1.35 !important;
        border-radius: 10px !important;
    }

    #profileModal {
        align-items: center !important;
        padding: 10px !important;
    }

    #profileModal .modal-content.profile-modal-wide {
        width: calc(100vw - 20px) !important;
        max-width: 460px !important;
        max-height: min(84dvh, 640px) !important;
        border-radius: 16px !important;
        clip-path: none !important;
        padding-top: 28px !important;
    }

    #profileModal .close {
        top: 10px !important;
        right: 10px !important;
    }
}

/* === Tablet adjustments === */
@media (min-width: 601px) and (max-width: 900px) {
    .container {
        padding: 24px;
        margin: 16px;
    }
    
    .nav-btn {
        padding: 12px 18px;
        font-size: 14px;
    }
    
    .hero-section h1 {
        font-size: 2em;
    }
    
    .stats-bar {
        grid-template-columns: repeat(2, minmax(0, 260px));
        justify-content: center;
        gap: 16px;
        max-width: min(100%, 600px);
    }
    
    .button-group {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .button-group .btn {
        flex: 1 1 45%;
        min-width: 150px;
    }
    
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .learning-chapters {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .challenges-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .levels-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* === Landscape mobile adjustments === */
@media (max-height: 500px) and (orientation: landscape) {
    .modal-content {
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .verification-box {
        padding: 16px 24px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .verification-btn {
        margin-top: 12px;
    }
}

/* === Safe area insets for notched devices === */
@supports (padding: max(0px)) {
    @media (max-width: 600px) {
        .container {
            padding-left: max(16px, env(safe-area-inset-left));
            padding-right: max(16px, env(safe-area-inset-right));
            padding-bottom: max(16px, env(safe-area-inset-bottom));
        }
        
        .nav-container {
            padding-left: max(12px, env(safe-area-inset-left));
            padding-right: max(12px, env(safe-area-inset-right));
        }
        
        .modal-content {
            padding-left: max(20px, env(safe-area-inset-left));
            padding-right: max(20px, env(safe-area-inset-right));
            padding-bottom: max(20px, env(safe-area-inset-bottom));
        }
    }
}

/* ============================================
   �������������� ����������� ��������� ������
   ============================================ */

/* ����������� ���������� ���� */

/* 1. ������� ���: ������ ������, ������� � .nav-btn-text ������ ��������� .header-nav */
@media (max-width: 600px) {
    .header-nav .nav-buttons {
        gap: 6px;
    }
    
    .header-nav .nav-btn {
        flex: 0 0 auto;
    }
}

/* 2. ����������� overflow �� body */
@media (max-width: 600px) {
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
    }
    
    body {
        overflow-x: hidden;
    }
}

/* 3. ����������� ������� ������� ��������� */
@media (max-width: 600px) {
    .surface-card,
    .section-head,
    .exam-settings,
    .exam-start-section,
    .exam-actions,
    .exam-results,
    .challenges-stats-bar,
    .challenges-grid,
    .learning-chapters,
    .levels-grid,
    .rewards-list,
    .tasks-list,
    .metrics-grid {
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .exam-settings {
        grid-template-columns: 1fr;
    }
    
    .exam-stats {
        flex-direction: column;
        gap: 12px;
    }
    
    .exam-stat-item {
        width: 100%;
    }
}

/* 4. ����������� ������ recording section */
@media (max-width: 600px) {
    .recording-section {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .recording-section .btn {
        width: 100%;
        margin: 0;
    }
    
    .recording-section .btn + .btn {
        margin-top: 0;
    }
    
    #startBtn,
    #stopBtn,
    #endSpeechBtn {
        width: 100%;
    }
    
    #endSpeechBtn {
        margin-top: 8px;
    }
}

/* 5. ����������� ������ - ������ */
@media (max-width: 600px) {
    .charts-section {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .charts-section canvas {
        min-width: 250px;
    }
    
    .metrics-grid {
        display: flex;
        flex-direction: column;
    }
    
    .metric-card {
        width: 100%;
    }
}

/* 6. ����������� learning chapters */
@media (max-width: 600px) {
    .learning-chapters {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .learning-chapter-card {
        padding: 12px;
    }
    
    .learning-theory {
        padding: 12px;
    }
    
    .learning-theory ul {
        padding-left: 16px;
    }
    
    .learning-quiz {
        gap: 8px;
    }
    
    .learning-quiz-item {
        padding: 12px;
    }
    
    .learning-options {
        gap: 6px;
    }
    
    .learning-option label {
        font-size: 14px;
    }
}

/* 7. ����������� levels grid */
@media (max-width: 600px) {
    .levels-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 14px;
    }
    
    .level-card {
        padding: 18px 16px;
        min-height: 200px;
    }
    
    .level-number {
        font-size: clamp(1.85rem, 7vw, 2.4rem);
    }
    
    .level-title {
        font-size: 0.8rem;
    }
}

/* 8. ����������� rewards � tasks */
@media (max-width: 600px) {
    .rewards-list {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .reward-item {
        flex-direction: row;
        align-items: center;
        padding: 12px;
    }
    
    .reward-icon {
        font-size: 2em;
        flex-shrink: 0;
    }
    
    .reward-details {
        flex: 1;
        min-width: 0;
    }
    
    .tasks-list {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .task-item {
        padding: 14px;
    }
    
    .task-item h4 {
        font-size: 0.95rem;
        margin-bottom: 8px;
    }
    
    .task-item p {
        font-size: 0.85rem;
        margin-bottom: 10px;
    }
}

/* 9. ����������� outline panel */
@media (max-width: 600px) {
    .outline-panel {
        padding: 12px;
    }
    
    .outline-panel-head {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .outline-panel-head button {
        flex: 1 1 auto;
        min-width: 80px;
    }
    
    .outline-segment {
        margin-bottom: 12px;
    }
    
    .outline-segment-title {
        font-size: 0.95rem;
    }
    
    .outline-list {
        padding-left: 16px;
    }
    
    .outline-list li {
        font-size: 0.85rem;
    }
}

/* 10. ����������� draft notice */
@media (max-width: 600px) {
    .draft-notice-wrap {
        flex-direction: column;
        gap: 10px;
    }
    
    .draft-notice {
        width: 100%;
    }
    
    #clearDraftBtn {
        width: 100%;
    }
}

/* 11. ����������� textarea-actions */
@media (max-width: 600px) {
    .textarea-actions {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .textarea-actions .btn {
        width: 100%;
    }
}

/* 12. ����������� scenario � select � ������� */
@media (max-width: 600px) {
    .scenario-section select,
    .speech-text-section select,
    .form-group select {
        width: 100%;
        padding-right: 36px;
    }
}

/* 13. ����������� questions section */
@media (max-width: 600px) {
    .question-card {
        padding: 14px;
    }
    
    .question-number {
        font-size: 0.8rem;
        margin-bottom: 8px;
    }
    
    .question-text {
        font-size: 1em;
        margin-bottom: 12px;
    }
    
    .question-actions {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .question-actions .btn {
        flex: none;
        width: 100%;
        max-width: 100%;
        min-height: 44px;
        white-space: normal;
        overflow: visible;
        overflow-wrap: normal;
        word-break: normal;
        hyphens: none;
        -webkit-hyphens: none;
    }
    
    .question-answer {
        margin-top: 10px;
        padding: 10px;
        font-size: 0.9rem;
    }
}

/* 14. ����������� history section */
@media (max-width: 600px) {
    #practiceTab .history-section.surface-card,
    .history-section.surface-card {
        margin-top: 10px !important;
        padding: 7px 8px 9px !important;
    }

    .history-section {
        margin-top: 10px;
        padding: 7px 8px 9px;
    }
    
    .history-head {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 7px;
        min-height: 0;
    }

    .history-collapse-toggle {
        flex: 0 0 auto;
        min-height: 0;
    }

    .history-head-actions {
        width: 100%;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 7px;
    }

    .history-head-actions .btn {
        flex: 1 1 0;
        width: auto;
        min-width: 0;
        padding: 7px 8px;
        font-size: 0.78rem;
    }
    
    .history-collapse-title {
        font-size: 0.95rem;
    }
    
    .history-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .history-title {
        font-size: 0.9rem;
    }
    
    .history-meta {
        font-size: 0.8rem;
    }
    
    .history-open-btn {
        width: 100%;
    }

    .history-list-panel {
        margin-top: 8px;
        padding-top: 8px;
    }
}

/* 15. ����������� exam session */
@media (max-width: 600px) {
    .exam-progress-text {
        font-size: 0.9rem;
    }
    
    .exam-progress-bar {
        height: 8px;
    }
    
    .exam-timer-section {
        padding: 12px;
        min-width: 100px;
    }
    
    .exam-timer-label {
        font-size: 11px;
    }
    
    .exam-timer {
        font-size: 28px;
    }
    
    .exam-timer.timer-warning {
        animation: none;
    }
    
    .exam-question-box {
        padding: 14px;
    }
    
    .exam-question-box h3 {
        font-size: 0.95rem;
    }
    
    .exam-actions {
        flex-direction: column;
    }
    
    .exam-actions .btn {
        width: 100%;
    }
    
    .exam-answer-section {
        padding: 10px;
    }
    
    .exam-answer-section textarea {
        min-height: 80px;
    }
}

/* 16. ����������� exam results */
@media (max-width: 600px) {
    .exam-results h2 {
        font-size: 1.15rem;
    }
    
    .exam-score-circle svg {
        width: 110px;
        height: 110px;
    }
    
    .exam-score-svg .exam-score-text {
        font-size: 24px;
    }
    
    .exam-score-label {
        font-size: 0.85rem;
    }
    
    .exam-answers-review {
        max-height: 150px;
    }
    
    .exam-answer-review-item {
        padding: 10px;
    }
    
    .exam-review-q {
        font-size: 0.85rem;
    }
    
    .exam-review-a {
        font-size: 0.8rem;
    }
}

/* 17. ����������� challenges */
@media (max-width: 600px) {
    .challenge-stat {
        padding: 14px;
    }
    
    .challenge-stat-number {
        font-size: 24px;
    }
    
    .challenge-stat-label {
        font-size: 0.75rem;
    }
    
    .today-challenge {
        padding: 16px;
    }
    
    .challenge-badge {
        font-size: 11px;
        padding: 5px 10px;
    }
    
    .today-challenge h3 {
        font-size: 1.1rem;
    }
    
    .challenge-desc {
        font-size: 0.85rem;
    }
    
    .challenge-progress-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    .challenge-progress-bar {
        width: 100%;
        max-width: none;
    }
    
    .challenge-progress-section span {
        text-align: center;
    }
    
    .challenges-grid {
        grid-template-columns: 1fr;
    }
    
    .challenge-card {
        padding: 14px;
    }
    
    .challenge-card h4 {
        font-size: 0.95rem;
    }
    
    .challenge-card p {
        font-size: 0.8rem;
    }
    
    .challenge-card-points {
        font-size: 11px;
        padding: 3px 8px;
    }
}

/* 18. ����������� timing panel */
@media (max-width: 600px) {
    .timing-adapt-panel {
        padding: 14px;
    }
    
    .timing-adapt-title {
        font-size: 1rem;
    }
    
    .timing-adapt-hint {
        font-size: 0.85rem;
    }
    
    .timing-presets {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .timing-chip {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .timing-range-row label {
        font-size: 0.85rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    #targetTimingLabel {
        font-size: 1em;
    }
    
    .timing-adapt-actions {
        margin-top: 12px;
    }
    
    .timing-adapt-actions .btn {
        width: 100%;
    }
}

/* 19. ����������� generated speech */
@media (max-width: 600px) {
    .generated-speech {
        padding: 14px;
    }
    
    .generated-speech h3 {
        font-size: 1rem;
    }
    
    .speech-output {
        padding: 12px;
        font-size: 0.85rem;
        line-height: 1.5;
        max-height: 200px;
        overflow-y: auto;
    }
    
    .speech-output-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .speech-output-actions .btn {
        width: 100%;
    }
    
    .adaptation-notes {
        padding: 10px;
        font-size: 0.85rem;
    }
}

/* 20. ����������� verification overlay */
@media (max-width: 600px) {
    .verification-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        padding: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .verification-box {
        width: 100%;
        max-width: 340px;
        padding: 20px;
    }
    
    .verification-icon {
        font-size: 2.5em;
    }
    
    .verification-box h2 {
        font-size: 1.2rem;
    }
    
    .verification-box p {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    .verification-btn {
        width: 100%;
        margin-top: 16px;
    }
}

/* 21. ����������� profile modal */
@media (max-width: 600px) {
    .profile-modal-wide {
        width: 100%;
        max-width: none;
    }
    
    .profile-info p {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .profile-info strong {
        font-size: 0.8rem;
    }
    
    .profile-info span {
        font-size: 0.9rem;
        align-self: flex-start;
    }
    
    .profile-actions {
        flex-direction: column;
    }
    
    .profile-actions .btn {
        width: 100%;
    }
}

/* 22. ����������� payment modal */
@media (max-width: 600px) {
    .payment-info {
        font-size: 0.9rem;
    }
    
    .payment-info ul {
        padding-left: 16px;
    }
    
    .payment-info li {
        margin-bottom: 8px;
    }
    
    .payment-actions {
        flex-direction: column;
    }
    
    .payment-actions .btn {
        width: 100%;
        flex: 0 0 auto;
    }
    
    .payment-note {
        font-size: 0.8rem;
    }
}

/* 23. ����������� captcha modal */
@media (max-width: 600px) {
    #captchaModal .modal-content {
        padding: 16px;
    }
    
    #captchaModal .captcha-question {
        font-size: 0.9rem;
    }
    
    #captchaModal .form-group {
        margin-bottom: 12px;
    }
    
    #analyzeCaptchaAnswer {
        font-size: 16px;
    }
    
    #analyzeCaptchaSubmit {
        width: 100%;
    }
}

/* 24. ����������� ������� overflow � container */
@media (max-width: 600px) {
    .container {
        overflow: visible;
    }
    
    body {
        overflow-x: hidden;
    }
    
    .tab-content {
        overflow: visible;
    }
}

/* 25. ��������� touch feedback */
@media (max-width: 600px) {
    .btn:active,
    .nav-btn:active,
    .tab:active,
    .timing-chip:active {
        transform: scale(0.97);
    }
    
    .surface-card:active {
        transform: scale(0.99);
    }
    
    .level-card:active,
    .challenge-card:active {
        transform: scale(0.98);
    }
}

/* 26. ����������� z-index ��� ��������� */
@media (max-width: 600px) {
    .header-nav {
        z-index: 999;
    }
    
    .modal {
        z-index: 5000;
    }
    
    .verification-overlay {
        z-index: 5200;
    }
}

/* 27. ����������� ������� ������ �������� */
@media (max-width: 600px) {
    html {
        scroll-behavior: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .tab-content {
        -webkit-overflow-scrolling: touch;
    }
    
    .exam-answers-review,
    .speech-output,
    .generated-speech,
    .history-list {
        -webkit-overflow-scrolling: touch;
    }
}

/* 28. ����������� overflow �� small screens - �������������� ��������������� ������� */
@media (max-width: 480px) {
    * {
        max-width: 100%;
    }
    
    /* ����� SVG ������ ���� ��������� �� ������ � �������� ����������� */
    .header-nav .nav-btn .nav-theme-icon, .header-nav .nav-btn .nav-inline-icon {
        max-width: none;
        width: 20px;
        height: 20px;
        min-width: 20px;
        min-height: 20px;
    }
    
    .surface-card {
        margin-left: -8px;
        margin-right: -8px;
        border-radius: 12px;
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .hero-feature-card {
        margin-left: -4px;
        margin-right: -4px;
    }
    
    .exam-answer-review-item,
    .challenge-card,
    .level-card,
    .task-item,
    .reward-item {
        margin-left: -4px;
        margin-right: -4px;
    }
}

/* 29. ����������� learning quiz buttons */
@media (max-width: 600px) {
    #checkLearningQuizBtn,
    #nextLearningChapterBtn {
        width: 100%;
    }
    
    #checkLearningQuizBtn + #nextLearningChapterBtn {
        margin-top: 8px;
    }
}

/* 30. ����������� exam buttons row */
@media (max-width: 600px) {
    #retakeExamBtn,
    #newExamBtn {
        width: 100%;
    }
    
    #retakeExamBtn + #newExamBtn {
        margin-top: 8px;
    }
}

/* 31. ��������� ����������� ��� ��������� ������ */
@media (max-width: 600px) {
    /* ����������� ��� container - ������� ������ padding */
    .container {
        margin: 4px;
        padding: 12px;
    }
    
    /* ����������� ��� body - �������������� ��������������� ������� */
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
    }
    
    /* ����������� ��� ���� �������� - ������� negative margins */
    .surface-card,
    .hero-feature-card,
    .exam-answer-review-item,
    .challenge-card,
    .level-card,
    .task-item,
    .reward-item,
    .question-card,
    .history-item {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    /* ����������� ��� modal-content - ����� �� ������� �� ����� */
    .modal-content {
        max-width: calc(100% - 20px);
        margin-left: auto;
        margin-right: auto;
    }
    
    /* Header: ������� ������ �� ����� ������ � ��. .header-nav .nav-btn .nav-btn-text */
    .header-nav .nav-btn .nav-btn-text {
        display: none !important;
    }
    
    .header-nav .nav-btn i,
    .header-nav .nav-btn .nav-theme-icon, .header-nav .nav-btn .nav-inline-icon {
        display: inline-block !important;
        margin-right: 0;
    }
    
    /* ����������� ��� buttons - ������� marign ����� �������� � group */
    .button-group {
        margin-left: 0;
        margin-right: 0;
    }
    
    /* ����������� ��� timeline ��������� */
    .timeline-item {
        padding-left: 10px;
    }
    
    /* ����������� ��� verification - ��������� */
    .verification-overlay {
        position: fixed;
        inset: 0;
        width: 100%;
        height: 100%;
    }
    
    .verification-box {
        max-width: calc(100% - 32px);
    }
    
    /* ����������� ��� tabs - ����� �� ���������� */
    .tabs {
        padding: 6px;
        gap: 4px;
    }
    
    .tab {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    /* ����������� ��� textarea - ����� �� ������� �� ����� */
    textarea {
        max-width: 100%;
        width: 100%;
    }
    
    /* ����������� ��� canvas � charts � height:auto �� canvas ������ Chart.js */
    #metricsChart {
        max-width: 100%;
    }
    
    /* ����������� ��� profile info */
    .profile-info {
        margin-left: -8px;
        margin-right: -8px;
        border-radius: 12px;
    }
    
    /* ��������: ��� ������������� ����� � ����� ���� ��������� �������� ������������ �������� */
    .draft-notice-wrap {
        margin-left: 0;
        margin-right: 0;
        max-width: 100%;
        align-items: stretch;
    }

    .draft-notice-wrap .draft-notice {
        text-align: left;
    }

    .draft-notice-wrap .btn {
        align-self: center;
    }
    
    /* ����������� ��� status messages */
    .status {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* ����������� ��� progress bar � analysis */
    .analysis-progress-track {
        width: 100%;
    }
    
    /* ����������� ��� recording VU meter */
    .recording-vu {
        margin-left: -8px;
        margin-right: -8px;
    }
    
    /* ����������� ��� feedback section */
    .feedback-section,
    .recommendations-section {
        margin-left: -8px;
        margin-right: -8px;
        padding-left: 12px;
        padding-right: 12px;
    }
    
    /* ����������� ��� timeline/progress */
    .timeline,
    .progress-track {
        width: 100%;
    }
}

/* 32. ����������� ��� ����� ��������� ������� - 320px � ������ */
@media (max-width: 320px) {
    .container {
        margin: 2px;
        padding: 10px;
    }
    
    .nav-btn {
        padding: 8px 6px;
        font-size: 10px;
    }
    
    .hero-section h1 {
        font-size: 1.3em;
    }
    
    .btn {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .tab {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
    
    .surface-card {
        padding: 12px;
    }
    
    .metric-card {
        padding: 12px;
    }
    
    .score-circle svg {
        width: 100px;
        height: 100px;
    }
}

/* 33. ����������� landscape ������ ��� ��������� */
@media (max-height: 500px) and (orientation: landscape) {
    .modal-content {
        max-height: 95vh;
        overflow-y: auto;
    }
    
    .verification-box {
        max-height: 95vh;
        overflow-y: auto;
    }
    
    .container {
        margin: 8px auto;
        padding: 12px;
    }
    
    .hero-section {
        padding: 8px 0;
    }
    
    .hero-section h1 {
        font-size: 1.3em;
    }
    
    .stats-bar {
        grid-template-columns: repeat(2, minmax(0, min(44vw, 232px)));
        justify-content: center;
        gap: 12px;
    }
}

/* 34. ��������� ������������������ ������� */
@media (max-width: 600px) {
    * {
        -webkit-overflow-scrolling: touch;
    }
    
    html {
        scroll-behavior: smooth;
    }
    
    /* ���������� ���� �� �������� */
    body {
        touch-action: pan-x pan-y;
    }
}

/* 35. ��������� accessibility ��� ��������� */
@media (max-width: 600px) {
    /* ���������� contrast ��� ������ */
    .section-desc,
    .subtitle,
    .prepare-intro,
    .timing-adapt-hint {
        color: var(--text-secondary);
        opacity: 0.9;
    }
    
    /* ��������� ��������� placeholder */
    ::-webkit-input-placeholder {
        color: #94a3b8;
    }
    
    ::-moz-placeholder {
        color: #94a3b8;
    }
    
    :-ms-input-placeholder {
        color: #94a3b8;
    }
    
    .dark-theme ::-webkit-input-placeholder {
        color: #64748b;
    }
    
    .dark-theme ::-moz-placeholder {
        color: #64748b;
    }
    
    .dark-theme :-ms-input-placeholder {
        color: #64748b;
    }
}

/* 36. ����������� z-index ��� ��������� ��������� �� ��������� */
@media (max-width: 600px) {
    .header-nav {
        position: sticky;
        top: 0;
        z-index: 999;
    }
    
    .modal {
        z-index: 5000;
    }
    
    .verification-overlay {
        z-index: 5200;
    }
    
    .dropdown-menu {
        z-index: 998;
    }
    
    /* ����������� position ��� dropdown select */
    .form-group select {
        position: relative;
        z-index: 1;
    }
}

/* 37. ����������� ��� iPhone X � ���� safe area */
@supports (padding: env(safe-area-inset-top)) {
    @media (max-width: 600px) {
        .header-nav {
            padding-top: max(10px, env(safe-area-inset-top));
            padding-bottom: max(10px, env(safe-area-inset-bottom));
        }
        
        .nav-container {
            padding-left: max(12px, env(safe-area-inset-left));
            padding-right: max(12px, env(safe-area-inset-right));
        }
        
        .container {
            padding-bottom: max(20px, env(safe-area-inset-bottom));
        }
        
        .modal-content {
            padding-bottom: max(20px, env(safe-area-inset-bottom));
        }
        
        .verification-btn {
            margin-bottom: max(16px, env(safe-area-inset-bottom));
        }
    }
}

/* === ������ (�������): ���� � ������� �� ����� ������ (������� �������� � ������ � � ����� ����� ����) === */
@media (max-width: 600px) {
    #prepareTab .section-head {
        margin-bottom: 6px !important;
        padding-bottom: 6px !important;
        gap: 8px !important;
    }

    #prepareTab .section-step-num {
        font-size: 14px !important;
    }

    #prepareTab .surface-card .section-title {
        font-size: 1.02rem !important;
        line-height: 1.32 !important;
        font-weight: 800 !important;
    }

    #prepareTab .form-group {
        margin-bottom: 8px !important;
    }

    #prepareTab label {
        font-size: 0.78rem !important;
        margin-bottom: 4px !important;
    }

    #prepareTab input,
    #prepareTab select,
    #prepareTab textarea {
        padding: 8px 10px !important;
        font-size: 13px !important;
        border-radius: 6px !important;
    }

    #prepareTab textarea {
        min-height: 48px !important;
    }

    #prepareTab .timing-adapt-panel {
        padding: 0 !important;
        margin: 1.15rem auto !important;
        border-radius: var(--border-radius-lg) !important;
    }

    #prepareTab .timing-adapt-title {
        font-size: 0.95rem !important;
        margin-bottom: 6px !important;
    }

    #prepareTab .timing-adapt-hint {
        font-size: 0.8rem !important;
        line-height: 1.45 !important;
        margin-bottom: 0.5rem !important;
    }

    #prepareTab .timing-presets {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        margin-bottom: 8px !important;
    }

    #prepareTab .timing-chip {
        padding: 9px 14px !important;
        font-size: 13px !important;
        border-radius: 10px !important;
        min-width: 72px !important;
    }

    #prepareTab .timing-range-row {
        margin-bottom: 8px !important;
    }

    #prepareTab .timing-range-row label {
        font-size: 0.8rem !important;
    }

    #prepareTab .timing-adapt-actions .btn {
        width: 100% !important;
        padding: 10px 14px !important;
        font-size: 0.875rem !important;
    }
}

/* === ����� �����: ���������, �� ������� (������ �� 10px; ��������� ��������) === */
@media (max-width: 600px) {
    /* surface-card � �������� ����� � ���� ���������, ��� ���� */
    .tab-content.active .surface-card,
    #practiceTab .surface-card,
    #prepareTab .surface-card {
        padding: 10px 12px !important;
        margin: 6px 0 10px 0 !important;
        border-radius: 10px !important;
    }
    
    /* ��� section-head � surface-card */
    .surface-card .section-head {
        padding: 4px 0 6px !important;
        margin-bottom: 8px !important;
        gap: 6px !important;
    }
    
    .surface-card .section-step-num {
        font-size: 13px !important;
        line-height: 1 !important;
    }
    
    .surface-card .section-title {
        font-size: 0.98rem !important;
        line-height: 1.28 !important;
        font-weight: 800 !important;
    }
    
    .surface-card .section-desc {
        display: none !important;
    }
    
    /* ��� labels */
    .surface-card label {
        font-size: 0.65rem !important;
        margin-bottom: 2px !important;
    }
    
    /* ��� ������ � textarea */
    .surface-card input,
    .surface-card select,
    .surface-card textarea {
        padding: 5px 6px !important;
        font-size: 11px !important;
        border-radius: 4px !important;
    }
    
    .surface-card textarea {
        min-height: 35px !important;
    }
    
    /* ������ � ��������� � ����� ����� �������� �� ������� (��� ���� ������� ����) */
    .surface-card:not(.questions-section) .btn {
        padding: 9px 12px !important;
        font-size: 0.8125rem !important;
        line-height: 1.35 !important;
        border-radius: 8px !important;
        margin: 0 !important;
        white-space: normal !important;
        word-break: normal !important;
        overflow-wrap: normal !important;
        hyphens: none !important;
        -webkit-hyphens: none !important;
    }

    .surface-card:not(.questions-section) .btn-small {
        padding: 8px 11px !important;
        font-size: 0.75rem !important;
    }

    #prepareTab .surface-card .btn {
        padding: 10px 14px !important;
        font-size: 0.9rem !important;
    }

    #prepareTab .surface-card .btn-small {
        padding: 9px 12px !important;
        font-size: 0.8125rem !important;
    }

    .questions-section.surface-card .btn,
    .questions-section .btn {
        padding: 11px 14px !important;
        font-size: 0.875rem !important;
        line-height: 1.35 !important;
        white-space: normal !important;
        word-break: normal !important;
        overflow-wrap: normal !important;
        hyphens: none !important;
        -webkit-hyphens: none !important;
    }
}

/* ������ (������) �� ����� ������: �������� ������� > ������� ����� > ���� ����� (��������� ������ � ����� ��� ���� .surface-card ����) */
@media (max-width: 600px) {
    #prepareTab .surface-card .section-desc {
        display: block !important;
        font-size: 0.72rem !important;
        line-height: 1.38 !important;
        margin-top: 2px !important;
        color: var(--text-muted) !important;
        font-weight: 500 !important;
    }

    #prepareTab .surface-card label {
        font-size: 0.8rem !important;
        font-weight: 600 !important;
    }

    #prepareTab .report-upload-panel {
        gap: 12px !important;
        margin-top: 10px !important;
        margin-bottom: 12px !important;
    }

    #prepareTab .file-drop-zone {
        padding: 14px 12px !important;
        gap: 6px !important;
    }

    #prepareTab .file-drop-zone__title {
        font-size: 0.88rem !important;
    }

    #prepareTab .file-drop-zone__hint {
        font-size: 0.66rem !important;
        line-height: 1.42 !important;
    }

    #prepareTab .textarea-meta {
        margin-top: 8px !important;
        font-size: 0.68rem !important;
        line-height: 1.4 !important;
    }

    #prepareTab .btn-row {
        gap: 12px !important;
        margin-bottom: 12px !important;
    }

    #prepareTab .btn-row:last-child {
        margin-bottom: 0 !important;
    }
}

/* =====================================================
   NEW DESIGN SYSTEM - BLOBS, AI BUTTONS, RIPPLES, ETC.
   ===================================================== */

/* === BLURRY BLOB BACKGROUND (Exact Implementation) === */
@keyframes pop-blob {
    0% { transform: scale(1); }
    33% { transform: scale(1.2); }
    66% { transform: scale(0.8); }
    100% { transform: scale(1); }
}

.blur-blob-filter {
    filter: blur(20px);
}

.blur-blob-filter-25 {
    filter: blur(25px);
}

.blur-blob-filter-3xl {
    filter: blur(64px);
}

/* Blurry Blob Container */
.blurry-blob-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 52vh;
    min-width: 52vw;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.blurry-blob-wrapper .blur-blob-inner {
    position: relative;
    width: 100%;
    max-width: 32rem;
    height: 100%;
    max-height: 32rem;
}

/* First Blob - Blue */
.blurry-blob-wrapper .blur-blob-first {
    position: absolute;
    right: -6rem;
    top: -7rem;
    height: 18rem;
    width: 18rem;
    border-radius: 0.25rem;
    background-color: #60a5fa;
    opacity: 0.45;
    mix-blend-mode: multiply;
    filter: blur(64px);
    animation: pop-blob 5s infinite;
    pointer-events: none;
    z-index: 0;
}

/* Second Blob - Purple */
.blurry-blob-wrapper .blur-blob-second {
    position: absolute;
    left: -10rem;
    top: -16rem;
    height: 18rem;
    width: 18rem;
    border-radius: 0.25rem;
    background-color: #c084fc;
    opacity: 0.45;
    mix-blend-mode: multiply;
    filter: blur(64px);
    animation: pop-blob 5s infinite;
    animation-delay: -2.5s;
    pointer-events: none;
    z-index: 0;
}

/* Dark Theme Adjustments */
.dark-theme .blurry-blob-wrapper .blur-blob-first {
    mix-blend-mode: screen;
    opacity: 0.25;
    background-color: #3b82f6;
}

.dark-theme .blurry-blob-wrapper .blur-blob-second {
    mix-blend-mode: screen;
    opacity: 0.25;
    background-color: #a855f7;
}

/* Responsive */
@media (max-width: 768px) {
    .blurry-blob-wrapper .blur-blob-first {
        right: -4rem;
        top: -5rem;
        height: 14rem;
        width: 14rem;
    }

    .blurry-blob-wrapper .blur-blob-second {
        left: -7rem;
        top: -12rem;
        height: 14rem;
        width: 14rem;
    }
}

@media (max-width: 480px) {
    .blurry-blob-wrapper .blur-blob-first {
        right: -3rem;
        top: -4rem;
        height: 12rem;
        width: 12rem;
    }

    .blurry-blob-wrapper .blur-blob-second {
        left: -5rem;
        top: -10rem;
        height: 12rem;
        width: 12rem;
    }
}

body {
    overflow-x: hidden;
}

/* === SPARKLE ANIMATION === */
@keyframes sparkle {
    0%, 100% { opacity: 0.75; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1); }
}

/* === AI BUTTON STYLE === */
.ai-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 32px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(139, 92, 246, 0.3));
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: visible;
    font-family: var(--font-primary);
    letter-spacing: 0.02em;
}

.ai-button::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 999px;
    background: linear-gradient(135deg, #3B82F6, #8B5CF6, #EC4899, #3B82F6);
    background-size: 300% 300%;
    animation: gradientShift 4s ease infinite;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.ai-button::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #3B82F6, #8B5CF6);
    z-index: -1;
}

.ai-button:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.4), 0 0 60px rgba(139, 92, 246, 0.2);
}

.ai-button:hover::before {
    opacity: 1;
}

.ai-button:active {
    transform: translateY(-1px) scale(0.98);
}

.ai-button .sparkle-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    animation: sparkle 2s ease-in-out infinite;
}

.ai-button .sparkle-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    animation: sparkle 2s ease-in-out infinite;
}

.ai-button .sparkle-dot:nth-child(1) {
    top: 20%;
    left: 15%;
    animation-delay: 0.3s;
}

.ai-button .sparkle-dot:nth-child(2) {
    top: 60%;
    right: 10%;
    animation-delay: 0.8s;
}

.ai-button .sparkle-dot:nth-child(3) {
    bottom: 15%;
    left: 30%;
    animation-delay: 1.3s;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* === RECORDING BUTTON (AI PRIMARY) === */
.btn-record-ai {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 36px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #3B82F6, #8B5CF6);
    color: white;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    font-family: var(--font-primary);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3), 0 0 40px rgba(139, 92, 246, 0.15);
}

.btn-record-ai::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 999px;
    background: conic-gradient(from 0deg, #3B82F6, #8B5CF6, #EC4899, #3B82F6);
    animation: rotateBorder 3s linear infinite;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.btn-record-ai:hover::before {
    opacity: 1;
}

.btn-record-ai:hover {
    transform: translateY(-4px) scale(1.04);
    box-shadow: 0 12px 40px rgba(59, 130, 246, 0.5), 0 0 80px rgba(139, 92, 246, 0.25);
}

.btn-record-ai:active {
    transform: translateY(-1px) scale(0.97);
}

.btn-record-ai .record-pulse {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ef4444;
    right: 16px;
    animation: recordPulse 1.5s ease-in-out infinite;
}

@keyframes rotateBorder {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes recordPulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6);
    }
    50% { 
        transform: scale(1.3);
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }
}

/* === ICON RIPPLE (MICROPHONE LISTENING) === */
.icon-ripple-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.15));
}

.icon-ripple-container .ripple-ring {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid rgba(59, 130, 246, 0.5);
    animation: rippleExpand 2s ease-out infinite;
}

.icon-ripple-container .ripple-ring:nth-child(2) {
    animation-delay: 0.6s;
}

.icon-ripple-container .ripple-ring:nth-child(3) {
    animation-delay: 1.2s;
}

@keyframes rippleExpand {
    0% {
        transform: scale(0.8);
        opacity: 0.8;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.icon-ripple-container .mic-icon {
    font-size: 24px;
    color: #3B82F6;
    z-index: 1;
}

/* === THEME CHECKBOX TOGGLE (������ ��� label + checkbox, �� ��� ������� � �����) === */
label.theme-toggle-label {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 4px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

label.theme-toggle-label:hover {
    background: rgba(59, 130, 246, 0.1);
}

.theme-checkbox {
    --toggle-size: 14px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 5.5em;
    height: 2.75em;
    background: linear-gradient(to right, #efefef 50%, #2a2a2a 50%) no-repeat;
    background-size: 205%;
    background-position: 0;
    transition: 0.4s;
    border-radius: 99em;
    position: relative;
    cursor: pointer;
    font-size: var(--toggle-size);
    border: none;
    outline: none;
}

.theme-checkbox::before {
    content: "";
    width: 2em;
    height: 2em;
    position: absolute;
    top: 0.375em;
    left: 0.375em;
    background: linear-gradient(to right, #efefef 50%, #2a2a2a 50%) no-repeat;
    background-size: 205%;
    background-position: 100%;
    border-radius: 50%;
    transition: 0.4s;
}

.theme-checkbox:checked::before {
    left: calc(100% - 2em - 0.375em);
    background-position: 0;
}

.theme-checkbox:checked {
    background-position: 100%;
}

/* === SPEED DIAL FAB: enhanced with glassmorphism === */
.speed-dial {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 12px;
}

.speed-dial-trigger {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
    background: linear-gradient(135deg, #3b82f6, #6d28d9);
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.45), inset 0 1px 0 rgba(255,255,255,0.25);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    will-change: transform;
}

.speed-dial-trigger:hover {
    transform: scale(1.1) rotate(45deg);
    box-shadow: 0 6px 30px rgba(79, 143, 255, 0.6), inset 0 1px 0 rgba(255,255,255,0.3);
}

.speed-dial-trigger.active {
    transform: rotate(45deg);
    background: linear-gradient(135deg, #ef4444, #b91c1c);
}

.speed-dial-actions {
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform, opacity;
}

.speed-dial.open .speed-dial-actions {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.speed-dial-action {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1.5px solid rgba(59,130,246,0.2);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    color: #3B82F6;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(59,130,246,0.2);
    transition: all 0.3s ease;
    position: relative;
    will-change: transform;
}

.speed-dial-action:hover {
    background: white;
    transform: scale(1.15);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.35);
    border-color: rgba(59,130,246,0.4);
}

.dark-theme .speed-dial-action {
    background: rgba(30,41,59,0.92);
    border-color: rgba(96,165,250,0.25);
    color: var(--dark-primary);
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.speed-dial-action .tooltip {
    position: absolute;
    right: 56px;
    background: rgba(15, 23, 42, 0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.speed-dial-action:hover .tooltip {
    opacity: 1;
    transform: translateX(0);
}

.dark-theme .speed-dial-action {
    background: rgba(30, 41, 59, 0.9);
    color: #60A5FA;
}

.dark-theme .speed-dial-action:hover {
    background: #1e293b;
}

.dark-theme .speed-dial-action .tooltip {
    background: rgba(30, 41, 59, 0.95);
}

/* === BUTTON WITH SLIDE ICON === */
.btn-slide-icon {
    position: relative;
    width: 160px;
    height: 50px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #3B82F6, #2563eb);
    color: white;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    font-family: var(--font-primary);
}

.btn-slide-icon .btn-text {
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.btn-slide-icon .btn-icon-wrap {
    position: absolute;
    right: 0;
    top: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.15);
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.btn-slide-icon:hover {
    background: linear-gradient(135deg, #60A5FA, #3B82F6);
    transform: translateY(-2px);
}

.btn-slide-icon:hover .btn-text {
    opacity: 0;
}

.btn-slide-icon:hover .btn-icon-wrap {
    width: 100%;
    border-left: none;
    background: transparent;
}

.btn-slide-icon:active {
    transform: scale(0.95);
}

/* === GLOW BUTTON === */
.btn-glow {
    position: relative;
    padding: 14px 32px;
    border: none;
    border-radius: 16px;
    background: #1C1A1C;
    color: #AAAAAA;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.45s ease;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-primary);
}

.btn-glow:hover {
    background: linear-gradient(135deg, #A47CF3, #683FEA);
    color: white;
    box-shadow: inset 0px 1px 0px 0px rgba(255, 255, 255, 0.4),
                inset 0px -4px 0px 0px rgba(0, 0, 0, 0.2),
                0px 0px 0px 4px rgba(255, 255, 255, 0.2),
                0px 0px 180px 0px #9917FF;
    transform: translateY(-2px);
}

.btn-glow .glow-sparkle {
    fill: #AAAAAA;
    transition: all 0.8s ease;
}

.btn-glow:hover .glow-sparkle {
    fill: white;
    transform: scale(1.2);
}

/* === CLIP BUTTON === */
.btn-clip {
    position: relative;
    padding: 14px 28px;
    border: 1px solid #3B82F6;
    border-radius: 12px;
    background: transparent;
    color: #3B82F6;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-family: var(--font-primary);
    letter-spacing: 0.05em;
}

.btn-clip::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #3B82F6;
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
    transition: clip-path 0.4s ease;
    z-index: -1;
}

.btn-clip:hover::before {
    clip-path: polygon(100% 0, 100% 100%, 0 100%, 0 0);
}

.btn-clip:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
}

/* === 3D PERSPECTIVE BUTTON === */
.btn-3d {
    position: relative;
    padding: 14px 32px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #ffffff, #e8ecf4);
    color: #3B82F6;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transform-style: preserve-3d;
    perspective: 500px;
    transition: all 0.3s ease;
    font-family: var(--font-primary);
    box-shadow: 0 4px 0 #2563eb, 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn-3d:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #2563eb, 0 8px 16px rgba(0, 0, 0, 0.2);
}

.btn-3d:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #2563eb, 0 3px 6px rgba(0, 0, 0, 0.1);
}

/* === NEUMORPHIC BUTTON === */
.btn-neumorphic {
    padding: 14px 28px;
    border: none;
    border-radius: 16px;
    background: linear-gradient(145deg, #f0f4ff, #e0e8f5);
    color: #3B82F6;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-primary);
    box-shadow: 6px 6px 12px rgba(59, 130, 246, 0.15),
                -6px -6px 12px rgba(255, 255, 255, 0.8);
}

.btn-neumorphic:hover {
    box-shadow: 8px 8px 16px rgba(59, 130, 246, 0.2),
                -8px -8px 16px rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

.btn-neumorphic:active {
    box-shadow: inset 4px 4px 8px rgba(59, 130, 246, 0.15),
                inset -4px -4px 8px rgba(255, 255, 255, 0.8);
    transform: translateY(0);
}

.dark-theme .btn-neumorphic {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    color: #60A5FA;
    box-shadow: 6px 6px 12px rgba(0, 0, 0, 0.4),
                -6px -6px 12px rgba(255, 255, 255, 0.05);
}

.dark-theme .btn-neumorphic:hover {
    box-shadow: 8px 8px 16px rgba(0, 0, 0, 0.5),
                -8px -8px 16px rgba(255, 255, 255, 0.07);
}

.dark-theme .btn-neumorphic:active {
    box-shadow: inset 4px 4px 8px rgba(0, 0, 0, 0.4),
                inset -4px -4px 8px rgba(255, 255, 255, 0.05);
}

/* === RECORDING STATE ANIMATIONS === */
.recording-active-state {
    position: relative;
}

.recording-active-state::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    background: linear-gradient(135deg, #3B82F6, #8B5CF6, #EC4899);
    background-size: 200% 200%;
    animation: gradientShift 2s ease infinite;
    z-index: -1;
    opacity: 0.8;
}

.recording-active-state .listening-wave {
    position: absolute;
    inset: -12px;
    border-radius: inherit;
    border: 2px solid rgba(59, 130, 246, 0.4);
    animation: listeningWave 2s ease-out infinite;
}

.recording-active-state .listening-wave:nth-child(2) {
    animation-delay: 0.5s;
}

.recording-active-state .listening-wave:nth-child(3) {
    animation-delay: 1s;
}

@keyframes listeningWave {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

/* === AI PROCESSING ANIMATION === */
.ai-processing {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.ai-processing .ai-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3B82F6;
    animation: aiBounce 1.4s ease-in-out infinite;
}

.ai-processing .ai-dot:nth-child(2) { animation-delay: 0.2s; background: #8B5CF6; }
.ai-processing .ai-dot:nth-child(3) { animation-delay: 0.4s; background: #EC4899; }

@keyframes aiBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1.2); opacity: 1; }
}

/* === GLASSMORPHISM CARD === */
.glass-card {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px) saturate(118%);
    -webkit-backdrop-filter: blur(10px) saturate(118%);
    border: 1px solid rgba(255, 255, 255, 0.92);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(37, 99, 235, 0.08);
}

.dark-theme .glass-card {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* === GRADIENT TEXT === */
.gradient-text {
    background: linear-gradient(135deg, #3B82F6, #8B5CF6, #EC4899);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* === FLOATING ANIMATION === */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.float-animation {
    animation: float 4s ease-in-out infinite;
}

/* === MORPHING BACKGROUND === */
@keyframes morphBg {
    0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    25% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
    50% { border-radius: 50% 60% 30% 60% / 30% 60% 70% 40%; }
    75% { border-radius: 60% 40% 60% 30% / 60% 40% 30% 70%; }
}

.morph-blob {
    position: absolute;
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(139, 92, 246, 0.3));
    animation: morphBg 8s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

/* === APPLY AI BUTTON TO RECORDING BUTTONS === */
#startBtn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 36px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #3B82F6, #8B5CF6);
    color: white;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    font-family: var(--font-primary);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3), 0 0 40px rgba(139, 92, 246, 0.15);
    letter-spacing: 0.02em;
}

#startBtn::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 999px;
    background: conic-gradient(from 0deg, #3B82F6, #8B5CF6, #EC4899, #3B82F6);
    animation: rotateBorder 3s linear infinite;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

#startBtn:hover {
    transform: translateY(-4px) scale(1.04);
    box-shadow: 0 12px 40px rgba(59, 130, 246, 0.5), 0 0 80px rgba(139, 92, 246, 0.25);
}

#startBtn:hover::before {
    opacity: 1;
}

#startBtn:active {
    transform: translateY(-1px) scale(0.97);
}

/* === APPLY AI BUTTON TO GENERATE + OUTLINE (��� ��������/����� ������ � ��� ��� .btn::before + ::after ����� ��������) === */
#generateBtn,
#outlineBtn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(139, 92, 246, 0.25));
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
    overflow: hidden;
    font-family: var(--font-primary);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

#generateBtn::after,
#outlineBtn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #3B82F6, #8B5CF6);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

#generateBtn:hover,
#outlineBtn:hover {
    color: white;
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.4), 0 0 60px rgba(139, 92, 246, 0.2);
    border-color: transparent;
}

#generateBtn:hover::after,
#outlineBtn:hover::after {
    opacity: 1;
}

/* === RECORDING SECTION GLOW === */
.recording-section {
    position: relative;
}

.recording-section.recording-active {
    animation: none;
}

.recording-section.recording-active::before {
    content: '';
    position: absolute;
    inset: -20px;
    border-radius: 32px;
    background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.15), transparent 70%);
    animation: recordingGlow 3s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes recordingGlow {
    0%, 100% { opacity: 0.5; transform: scale(0.95); }
    50% { opacity: 1; transform: scale(1.05); }
}

/* === MICROPHONE RIPPLE IN RECORDING === */
.mic-ripple {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mic-ripple .ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(59, 130, 246, 0.4);
    animation: micRipple 2s ease-out infinite;
}

.mic-ripple .ring:nth-child(2) { animation-delay: 0.5s; }
.mic-ripple .ring:nth-child(3) { animation-delay: 1s; }

@keyframes micRipple {
    0% { transform: scale(0.8); opacity: 0.8; }
    100% { transform: scale(2.5); opacity: 0; }
}

/* === STOP BUTTON STYLE === */
#stopBtn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--font-primary);
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.3);
}

#stopBtn:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 32px rgba(239, 68, 68, 0.5);
    background: linear-gradient(135deg, #f87171, #ef4444);
}

#stopBtn:active:not(:disabled) {
    transform: translateY(-1px) scale(0.97);
}

/* === SECONDARY BUTTONS UPDATE === */
#endSpeechBtn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.08);
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--font-primary);
}

#endSpeechBtn:hover:not(:disabled) {
    background: linear-gradient(135deg, #3B82F6, #8B5CF6);
    color: white;
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.3);
}

/* === ANALYZING STATUS WITH AI DOTS === */
.status.analyzing {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(139, 92, 246, 0.08));
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 999px;
    padding: 16px 28px;
}

.analyzing-dot {
    background: linear-gradient(135deg, #3B82F6, #8B5CF6) !important;
}

/* === DARK THEME OVERRIDES FOR NEW STYLES === */
.dark-theme #startBtn {
    background: linear-gradient(135deg, #60A5FA, #8B5CF6);
    box-shadow: 0 4px 20px rgba(96, 165, 250, 0.3), 0 0 40px rgba(139, 92, 246, 0.1);
}

.dark-theme #startBtn:hover {
    box-shadow: 0 12px 40px rgba(96, 165, 250, 0.5), 0 0 80px rgba(139, 92, 246, 0.2);
}

.dark-theme #generateBtn,
.dark-theme #outlineBtn {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.15), rgba(139, 92, 246, 0.15));
    border-color: rgba(96, 165, 250, 0.2);
    color: #f1f5f9;
}

.dark-theme #generateBtn::after,
.dark-theme #outlineBtn::after {
    background: linear-gradient(135deg, #60A5FA, #8B5CF6);
}

.dark-theme .btn-glow {
    background: #1e293b;
    color: #94a3b8;
}

.dark-theme .btn-glow:hover {
    background: linear-gradient(135deg, #8B5CF6, #683FEA);
    box-shadow: inset 0px 1px 0px 0px rgba(255, 255, 255, 0.2),
                inset 0px -4px 0px 0px rgba(0, 0, 0, 0.3),
                0px 0px 0px 4px rgba(139, 92, 246, 0.2),
                0px 0px 120px 0px rgba(139, 92, 246, 0.4);
}

/* === RECORDING EQUALIZER ENHANCEMENT === */
.equalizer-canvas {
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(139, 92, 246, 0.05));
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.dark-theme .equalizer-canvas {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.08), rgba(139, 92, 246, 0.08));
    border-color: rgba(96, 165, 250, 0.15);
}

/* === TIMER ENHANCEMENT === */
#timer {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #3B82F6, #8B5CF6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    margin-top: 16px;
    letter-spacing: 0.05em;
}

.dark-theme #timer {
    background: linear-gradient(135deg, #60A5FA, #A78BFA);
    -webkit-background-clip: text;
    background-clip: text;
}

/* === STATUS ENHANCEMENTS === */
.status {
    margin-top: 20px;
    padding: 14px 24px;
    border-radius: 999px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.4s ease;
}

.status.recording {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.05));
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.dark-theme .status.recording {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
}

.status.processing {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.05));
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.dark-theme .status.processing {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.3);
}

/* =====================================================
   EXTENDED ANIMATIONS & VISUAL IMPROVEMENTS
   ===================================================== */

/* === BUTTON WITH SLIDE ICON (from user request) === */
.btn-wrapper {
    --dot-size: 6px;
    --line-weight: 1px;
    --line-distance: 0.9rem 1.1rem;
    --animation-speed: 0.35s;
    --dot-color: #666;
    --line-color: #999;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: auto;
    height: auto;
    padding: var(--line-distance);
    background-color: transparent;
    transition: background-color 0.3s ease-in-out;
    user-select: none;
    border-radius: 12px;
}

.btn-wrapper:has(.btn:hover) {
    animation: backround-color-change calc(var(--animation-speed) * 4) ease-in-out forwards;
}

@keyframes backround-color-change {
    80% { background-color: transparent; }
    100% { background-color: rgba(59, 130, 246, 0.1); }
}

.btn-wrapper .btn {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.8rem 1.25rem;
    background-color: #3B82F6;
    background-image: linear-gradient(transparent, rgba(0, 0, 0, 0.1));
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 600;
    text-transform: capitalize;
    border-radius: 30% / 200%;
    cursor: pointer;
    box-shadow: 0 0 0px 1px rgba(0, 0, 0, 0.1),
                0px 1px 1px rgba(3, 7, 18, 0.02),
                0px 5px 4px rgba(3, 7, 18, 0.04),
                0px 12px 9px rgba(3, 7, 18, 0.06),
                0px 20px 15px rgba(3, 7, 18, 0.08),
                0px 32px 24px rgba(3, 7, 18, 0.1);
    transition: background-color 0.2s ease-in-out,
                transform 0.2s ease-in-out,
                box-shadow 0.2s ease-in-out,
                border-radius 0.3s ease-in-out;
}

.btn-wrapper .btn:hover {
    background-color: #60A5FA;
    transform: scale(1.05);
    border-radius: 10% / 200%;
}

.btn-wrapper .btn:active {
    background-color: #2563eb;
    transform: scale(0.98);
    border-radius: 20% / 200%;
}

.btn-wrapper .dot {
    position: absolute;
    width: var(--dot-size);
    aspect-ratio: 1;
    border-radius: 50%;
    background-color: var(--dot-color);
    transition: all 0.3s ease-in-out;
    opacity: 0;
}

.btn-wrapper:has(.btn:hover) .dot.top.left {
    top: 50%;
    left: 20%;
    animation: move-top-left var(--animation-speed) ease-in-out forwards;
}

@keyframes move-top-left {
    90% { opacity: 0.6; }
    100% {
        top: calc(var(--dot-size) * -0.5);
        left: calc(var(--dot-size) * -0.5);
        opacity: 1;
    }
}

.btn-wrapper:has(.btn:hover) .dot.top.right {
    top: 50%;
    right: 20%;
    animation: move-top-right var(--animation-speed) ease-in-out forwards;
    animation-delay: calc(var(--animation-speed) * 0.6);
}

@keyframes move-top-right {
    80% { opacity: 0.6; }
    100% {
        top: calc(var(--dot-size) * -0.5);
        right: calc(var(--dot-size) * -0.5);
        opacity: 1;
    }
}

.btn-wrapper:has(.btn:hover) .dot.bottom.right {
    bottom: 50%;
    right: 20%;
    animation: move-bottom-right var(--animation-speed) ease-in-out forwards;
    animation-delay: calc(var(--animation-speed) * 1.2);
}

@keyframes move-bottom-right {
    80% { opacity: 0.6; }
    100% {
        bottom: calc(var(--dot-size) * -0.5);
        right: calc(var(--dot-size) * -0.5);
        opacity: 1;
    }
}

.btn-wrapper:has(.btn:hover) .dot.bottom.left {
    bottom: 50%;
    left: 20%;
    animation: move-bottom-left var(--animation-speed) ease-in-out forwards;
    animation-delay: calc(var(--animation-speed) * 1.8);
}

@keyframes move-bottom-left {
    80% { opacity: 0.6; }
    100% {
        bottom: calc(var(--dot-size) * -0.5);
        left: calc(var(--dot-size) * -0.5);
        opacity: 1;
    }
}

.btn-wrapper .line {
    position: absolute;
    transition: all 0.3s ease-in-out;
}

.btn-wrapper .line.horizontal {
    height: var(--line-weight);
    width: 100%;
    background-image: repeating-linear-gradient(
        90deg,
        transparent 0 calc(var(--line-weight) * 2),
        var(--line-color) calc(var(--line-weight) * 2) calc(var(--line-weight) * 4)
    );
}

.btn-wrapper .line.top {
    top: calc(var(--line-weight) * -0.5);
    transform-origin: top left;
    transform: rotate(5deg) scaleX(0);
}

.btn-wrapper:has(.btn:hover) .line.top {
    animation: draw-top var(--animation-speed) ease-in-out forwards;
    animation-delay: calc(var(--animation-speed) * 0.8);
}

@keyframes draw-top {
    100% { transform: rotate(0deg) scaleX(1); }
}

.btn-wrapper .line.bottom {
    bottom: calc(var(--line-weight) * -0.5);
    transform-origin: bottom right;
    transform: rotate(5deg) scaleX(0);
}

.btn-wrapper:has(.btn:hover) .line.bottom {
    animation: draw-bottom var(--animation-speed) ease-in-out forwards;
    animation-delay: calc(var(--animation-speed) * 2);
}

@keyframes draw-bottom {
    100% { transform: rotate(0deg) scaleX(1); }
}

.btn-wrapper .line.left {
    left: calc(var(--line-weight) * -0.5);
    width: var(--line-weight);
    height: 100%;
    transform-origin: bottom left;
    transform: rotate(0deg) scaleY(0);
}

.btn-wrapper:has(.btn:hover) .line.left {
    animation: draw-left var(--animation-speed) ease-in-out forwards;
    animation-delay: calc(var(--animation-speed) * 2.4);
}

@keyframes draw-left {
    100% { transform: rotate(0deg) scaleY(1); }
}

.btn-wrapper .line.right {
    right: calc(var(--line-weight) * -0.5);
    width: var(--line-weight);
    height: 100%;
    transform-origin: top right;
    transform: rotate(5deg) scaleY(0);
}

.btn-wrapper:has(.btn:hover) .line.right {
    animation: draw-right var(--animation-speed) ease-in-out forwards;
    animation-delay: calc(var(--animation-speed) * 1.4);
}

@keyframes draw-right {
    100% { transform: rotate(0deg) scaleY(1); }
}

/* === BUTTON WITH SLIDING ICON === */
.btn-icon-slide {
    position: relative;
    width: 150px;
    height: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    background: #3B82F6;
    border: none;
    border-radius: 8px;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.15);
    font-family: var(--font-primary);
    overflow: hidden;
    transition: all 0.2s ease;
}

.btn-icon-slide, .btn-icon-slide .slide-text {
    transition: 0.2s;
}

.btn-icon-slide .slide-text {
    transform: translateX(35px);
    color: white;
    font-weight: bold;
    font-size: 14px;
    white-space: nowrap;
}

.btn-icon-slide .slide-icon-wrap {
    position: absolute;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    transform: translateX(110px);
    height: 40px;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.btn-icon-slide .slide-icon-wrap i {
    font-size: 16px;
    color: white;
    transition: transform 0.2s;
}

.btn-icon-slide:hover {
    background: #60A5FA;
}

.btn-icon-slide:hover .slide-text {
    color: transparent;
}

.btn-icon-slide:hover .slide-icon-wrap {
    width: 150px;
    border-left: none;
    transform: translateX(0);
}

.btn-icon-slide:focus {
    outline: none;
}

.btn-icon-slide:active .slide-icon-wrap i {
    transform: scale(0.8);
}

/* === SPARKLE BUTTON (from user request) === */
.btn-sparkle {
    border: none;
    width: 15em;
    height: 5em;
    border-radius: 3em;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    background: #1C1A1C;
    cursor: pointer;
    transition: all 0.45s ease-in-out;
    font-family: var(--font-primary);
}

.btn-sparkle .sparkle-svg {
    fill: #AAAAAA;
    transition: all 0.8s ease;
}

.btn-sparkle .sparkle-text {
    font-weight: 600;
    color: #AAAAAA;
    font-size: medium;
}

.btn-sparkle:hover {
    background: linear-gradient(0deg, #A47CF3, #683FEA);
    box-shadow: inset 0px 1px 0px 0px rgba(255, 255, 255, 0.4),
                inset 0px -4px 0px 0px rgba(0, 0, 0, 0.2),
                0px 0px 0px 4px rgba(255, 255, 255, 0.2),
                0px 0px 180px 0px #9917FF;
    transform: translateY(-2px);
}

.btn-sparkle:hover .sparkle-text {
    color: white;
}

.btn-sparkle:hover .sparkle-svg {
    fill: white;
    transform: scale(1.2);
}

/* === CLIP PATH BUTTON === */
.btn-31 {
    border-width: 1px;
    padding: 1rem 2rem;
    position: relative;
    text-transform: uppercase;
    background-color: #3B82F6;
    color: white;
    cursor: pointer;
    font-family: var(--font-primary);
    font-size: 100%;
    font-weight: 900;
    line-height: 1.5;
    border-radius: 12px;
    border: none;
    transition: clip-path 0.2s ease;
}

.btn-31:before {
    --progress: 100%;
    background: white;
    clip-path: polygon(100% 0, var(--progress) var(--progress), 0 100%, 100% 100%);
    content: "";
    inset: 0;
    position: absolute;
    transition: clip-path 0.2s ease;
}

.btn-31:hover:before {
    --progress: 0%;
}

.btn-31 .text-container {
    display: block;
    overflow: hidden;
    position: relative;
}

.btn-31 .text {
    display: block;
    font-weight: 900;
    mix-blend-mode: difference;
    position: relative;
}

.btn-31:hover .text {
    animation: move-up-alternate 0.3s ease forwards;
}

@keyframes move-up-alternate {
    0% { transform: translateY(0); }
    50% { transform: translateY(80%); }
    51% { transform: translateY(-80%); }
    to { transform: translateY(0); }
}

/* === NEUMORPHIC BUTTON (enhanced) === */
.btn-neumorphic {
    padding: 14px 28px;
    border: none;
    border-radius: 16px;
    background: linear-gradient(145deg, #f0f4ff, #e0e8f5);
    color: #3B82F6;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-primary);
    box-shadow: 6px 6px 12px rgba(59, 130, 246, 0.15),
                -6px -6px 12px rgba(255, 255, 255, 0.8);
}

.btn-neumorphic:hover {
    box-shadow: 8px 8px 16px rgba(59, 130, 246, 0.2),
                -8px -8px 16px rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    color: #2563eb;
}

.btn-neumorphic:active {
    box-shadow: inset 4px 4px 8px rgba(59, 130, 246, 0.15),
                inset -4px -4px 8px rgba(255, 255, 255, 0.8);
    transform: translateY(0);
}

.dark-theme .btn-neumorphic {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    color: #60A5FA;
    box-shadow: 6px 6px 12px rgba(0, 0, 0, 0.4),
                -6px -6px 12px rgba(255, 255, 255, 0.05);
}

.dark-theme .btn-neumorphic:hover {
    box-shadow: 8px 8px 16px rgba(0, 0, 0, 0.5),
                -8px -8px 16px rgba(255, 255, 255, 0.07);
    color: #93c5fd;
}

.dark-theme .btn-neumorphic:active {
    box-shadow: inset 4px 4px 8px rgba(0, 0, 0, 0.4),
                inset -4px -4px 8px rgba(255, 255, 255, 0.05);
}

/* === 3D PERSPECTIVE BUTTON === */
.btn-3d-perspective {
    padding: 14px 32px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #ffffff, #e8ecf4);
    color: #3B82F6;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transform-style: preserve-3d;
    perspective: 500px;
    transition: all 0.3s ease;
    font-family: var(--font-primary);
    box-shadow: 0 4px 0 #2563eb, 0 6px 12px rgba(0, 0, 0, 0.15);
    animation: rotateAngle 6s linear infinite;
}

.btn-3d-perspective:hover {
    background: linear-gradient(135deg, #60A5FA, #3B82F6);
    color: white;
    animation-play-state: paused;
}

@keyframes rotateAngle {
    0% { transform: rotateY(0deg) rotateX(10deg); }
    25% { transform: rotateY(20deg) rotateX(10deg); }
    50% { transform: rotateY(0deg) rotateX(10deg); }
    75% { transform: rotateY(-20deg) rotateX(10deg); }
    100% { transform: rotateY(0deg) rotateX(10deg); }
}

/* === GRADIENT BORDER BUTTON === */
.btn-gradient-border {
    --active: 0;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transform-origin: center;
    padding: 1rem 2rem;
    background-color: transparent;
    border: none;
    border-radius: 9999px;
    transform: scale(calc(1 + (var(--active, 0) * 0.1)));
    transition: transform 0.3s ease-in-out;
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 600;
    color: white;
}

.btn-gradient-border::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background-color: #1C1A1C;
    border-radius: 9999px;
    box-shadow: inset 0 0.5px hsl(0, 0%, 100%),
                inset 0 -1px 2px 0 hsl(0, 0%, 0%),
                0px 4px 10px -4px hsla(0 0% 0% / calc(1 - var(--active, 0))),
                0 0 0 calc(var(--active, 0) * 0.375rem) hsl(260 97% 50% / 0.75);
    transition: all 0.3s ease-in-out;
    z-index: 0;
}

.btn-gradient-border::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background-color: hsla(260 97% 61% / 0.75);
    background-image: radial-gradient(at 51% 89%, hsla(266, 45%, 74%, 1) 0px, transparent 50%),
                      radial-gradient(at 100% 100%, hsla(266, 36%, 60%, 1) 0px, transparent 50%),
                      radial-gradient(at 22% 91%, hsla(266, 36%, 60%, 1) 0px, transparent 50%);
    background-position: top;
    opacity: var(--active, 0);
    border-radius: 9999px;
    transition: opacity 0.3s ease-in-out;
    z-index: 2;
}

.btn-gradient-border:hover,
.btn-gradient-border:focus-visible {
    --active: 1;
}

.btn-gradient-border:active {
    transform: scale(1);
}

.btn-gradient-border .dots_border {
    --size_border: calc(100% + 2px);
    overflow: hidden;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: var(--size_border);
    height: var(--size_border);
    background-color: transparent;
    border-radius: 9999px;
    z-index: -10;
}

.btn-gradient-border .dots_border::before {
    content: "";
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    transform-origin: left;
    transform: rotate(0deg);
    width: 100%;
    height: 2rem;
    background-color: white;
    mask: linear-gradient(transparent 0%, white 120%);
    animation: rotateBorderDots 2s linear infinite;
}

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

.btn-gradient-border .sparkle-icon {
    position: relative;
    z-index: 10;
    width: 1.75rem;
}

.btn-gradient-border .sparkle-icon .path {
    fill: currentColor;
    stroke: currentColor;
    transform-origin: center;
    color: hsl(0, 0%, 100%);
}

.btn-gradient-border:hover .sparkle-icon .path,
.btn-gradient-border:focus .sparkle-icon .path {
    animation: sparklePath 1.5s linear 0.5s infinite;
}

@keyframes sparklePath {
    0%, 34%, 71%, 100% { transform: scale(1); }
    17% { transform: scale(1.2); }
    49% { transform: scale(1.2); }
    83% { transform: scale(1.2); }
}

.btn-gradient-border .text_button {
    position: relative;
    z-index: 10;
    background-image: linear-gradient(90deg, hsla(0 0% 100% / 1) 0%, hsla(0 0% 100% / var(--active, 0)) 120%);
    background-clip: text;
    font-size: 1rem;
    color: transparent;
}

/* === TOOLTIP BUTTON === */
.tooltip-container {
    --background: #333333;
    --color: #e8e8e8;
    position: relative;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    font-size: 14px;
    font-weight: 600;
    color: var(--color);
    padding: 0.7em 1.8em;
    border-radius: 8px;
    text-transform: uppercase;
    height: 50px;
    display: grid;
    place-items: center;
    border: 2px solid var(--color);
    background: transparent;
    font-family: var(--font-primary);
}

.tooltip-container .text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    transform-origin: -100%;
    transform: scale(1);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.tooltip-container span:last-child {
    position: absolute;
    top: 0%;
    left: 100%;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    opacity: 1;
    background-color: var(--background);
    z-index: -1;
    border: 2px solid var(--background);
    transform: scale(0);
    transform-origin: 0;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    display: grid;
    place-items: center;
}

.tooltip-container .tooltip-text {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.3em 0.6em;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    background: var(--background);
    z-index: -1;
    border-radius: 8px;
    scale: 0;
    transform-origin: 0 0;
    text-transform: capitalize;
    font-weight: 400;
    font-size: 12px;
    box-shadow: rgba(0, 0, 0, 0.25) 0 8px 15px;
    color: white;
}

.tooltip-container:hover .tooltip-text {
    top: -100%;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    scale: 1;
    animation: tooltipShake 0.5s ease-in-out both;
}

.tooltip-container:hover {
    box-shadow: rgba(0, 0, 0, 0.25) 0 8px 15px;
    color: white;
    border-color: transparent;
}

.tooltip-container:hover span:last-child {
    transform: scale(1);
    left: 0;
}

.tooltip-container:hover .text {
    opacity: 0;
    top: 0%;
    left: 100%;
    transform: scale(0);
}

@keyframes tooltipShake {
    0% { rotate: 0; }
    25% { rotate: 7deg; }
    50% { rotate: -7deg; }
    75% { rotate: 1deg; }
    100% { rotate: 0; }
}

/* === ROTATE BUTTON === */
.btn-rotate {
    padding: 0.6em 1em;
    border: 4px solid #3B82F6;
    transition: ease-in-out 0.3s;
    background-color: transparent;
    color: #3B82F6;
    font-weight: bolder;
    font-size: 14px;
    font-family: var(--font-primary);
    border-radius: 8px;
}

.btn-rotate:hover {
    transform: scale(1.2) rotate(10deg);
    background-color: #3B82F6;
    color: white;
}

/* === CARD HOVER EFFECTS === */
.surface-card {
    position: relative;
    overflow: hidden;
}

.surface-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
    pointer-events: none;
}

.surface-card:hover::before {
    left: 100%;
}

.dark-theme .surface-card::before {
    display: none;
}

/* === HERO SECTION ENHANCEMENTS === */
.hero-section {
    position: relative;
    overflow: visible;
}

.hero-section .floating-emoji {
    position: absolute;
    font-size: 2rem;
    animation: floatEmoji 6s ease-in-out infinite;
    pointer-events: none;
    opacity: 0.6;
}

.hero-section .floating-emoji:nth-child(1) { top: 10%; left: 5%; animation-delay: 0s; }
.hero-section .floating-emoji:nth-child(2) { top: 20%; right: 8%; animation-delay: 1s; }
.hero-section .floating-emoji:nth-child(3) { bottom: 15%; left: 10%; animation-delay: 2s; }
.hero-section .floating-emoji:nth-child(4) { bottom: 25%; right: 5%; animation-delay: 3s; }

@keyframes floatEmoji {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.6; }
    25% { transform: translateY(-20px) rotate(10deg); opacity: 0.8; }
    50% { transform: translateY(-10px) rotate(-5deg); opacity: 0.6; }
    75% { transform: translateY(-25px) rotate(5deg); opacity: 0.7; }
}

/* === TAB ENHANCEMENTS === */
.tab {
    position: relative;
    overflow: visible;
}

.tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #3B82F6, #8B5CF6);
    transition: all 0.4s ease;
    transform: translateX(-50%);
    border-radius: 3px 3px 0 0;
}

.tab.active::after {
    width: 80%;
}

.tab:hover::after {
    width: 60%;
}

/* === PROGRESS BAR ENHANCEMENTS === */
.progress-bar-fill {
    position: relative;
    overflow: hidden;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progressShimmer 2s infinite;
}

@keyframes progressShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* === METRIC CARD ENHANCEMENTS === */
.metric-card {
    position: relative;
    overflow: hidden;
}

.metric-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.08), transparent 60%);
    transition: all 0.5s ease;
    pointer-events: none;
}

.metric-card:hover::after {
    top: -30%;
    right: -30%;
}

/* === CHART CARD ENHANCEMENTS === */
.chart-card {
    position: relative;
    overflow: hidden;
}

.chart-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3B82F6, #8B5CF6, #EC4899);
    opacity: 0.7;
}

/* === INPUT ENHANCEMENTS === */
input:focus,
textarea:focus,
select:focus {
    position: relative;
}

input:focus::after,
textarea:focus::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: linear-gradient(135deg, #3B82F6, #8B5CF6);
    opacity: 0.3;
    z-index: -1;
    animation: inputGlow 1s ease-out;
}

@keyframes inputGlow {
    0% { opacity: 0.5; transform: scale(1.02); }
    100% { opacity: 0.3; transform: scale(1); }
}

/* === LOADING STATES === */
.loading-shimmer {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.05) 25%, rgba(59, 130, 246, 0.1) 50%, rgba(59, 130, 246, 0.05) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

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

/* === MODAL ENHANCEMENTS === */
.modal-content {
    position: relative;
    overflow: visible;
}

.modal-content::before {
    content: '';
    display: none;
}

/* === NOTIFICATION DOT === */
.notification-dot {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ef4444;
    animation: notificationPulse 2s ease-in-out infinite;
}

@keyframes notificationPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

/* === SCROLL INDICATOR === */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #3B82F6, #8B5CF6, #EC4899);
    z-index: 10000;
    transition: width 0.1s ease;
}

/* === WAVE DIVIDER === */
.wave-divider {
    position: relative;
    height: 60px;
    overflow: hidden;
}

.wave-divider::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%233B82F6' fill-opacity='0.1' d='M0,192L48,197.3C96,203,192,213,288,229.3C384,245,480,267,576,250.7C672,235,768,181,864,181.3C960,181,1056,235,1152,234.7C1248,235,1344,181,1392,154.7L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E") no-repeat bottom;
    background-size: 50% 100%;
    animation: waveMove 10s linear infinite;
}

@keyframes waveMove {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* === DARK THEME BUTTON OVERRIDES === */
.dark-theme .btn-gradient-border::before {
    background-color: #1e293b;
}

.dark-theme .btn-sparkle {
    background: #1e293b;
}

.dark-theme .btn-sparkle .sparkle-text {
    color: #94a3b8;
}

.dark-theme .btn-sparkle .sparkle-svg {
    fill: #94a3b8;
}

.dark-theme .btn-sparkle:hover {
    background: linear-gradient(0deg, #8B5CF6, #683FEA);
}

.dark-theme .btn-31 {
    background-color: #1e293b;
}

.dark-theme .btn-31:before {
    background: #60A5FA;
}

.dark-theme .btn-rotate {
    border-color: #60A5FA;
    color: #60A5FA;
}

.dark-theme .btn-rotate:hover {
    background-color: #60A5FA;
    color: #0f172a;
}

.dark-theme .tooltip-container {
    --background: #1e293b;
    --color: #f1f5f9;
}

/* === RESPONSIVE FAB === */
@media (max-width: 768px) {
    .speed-dial {
        bottom: 20px;
        right: 20px;
    }

    .speed-dial-trigger {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    .speed-dial-action {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .speed-dial {
        bottom: 16px;
        right: 16px;
    }

    .speed-dial-trigger {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }

    .speed-dial-action {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .speed-dial-action .tooltip {
        display: none;
    }
}

/* === PAGE TRANSITION ANIMATIONS === */
@keyframes pageEnter {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.container {
    animation: pageEnter 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* === STAGGERED CHILD ANIMATIONS === */
.hero-feature-card,
.metric-card,
.stat,
.level-card,
.challenge-card {
    animation: staggerFadeIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.hero-feature-card:nth-child(1),
.metric-card:nth-child(1),
.stat:nth-child(1),
.level-card:nth-child(1),
.challenge-card:nth-child(1) { animation-delay: 0.05s; }

.hero-feature-card:nth-child(2),
.metric-card:nth-child(2),
.stat:nth-child(2),
.level-card:nth-child(2),
.challenge-card:nth-child(2) { animation-delay: 0.1s; }

.hero-feature-card:nth-child(3),
.metric-card:nth-child(3),
.stat:nth-child(3),
.level-card:nth-child(3),
.challenge-card:nth-child(3) { animation-delay: 0.15s; }

.hero-feature-card:nth-child(4) { animation-delay: 0.2s; }
.hero-feature-card:nth-child(5) { animation-delay: 0.25s; }

@keyframes staggerFadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === GLOW EFFECTS FOR ACTIVE ELEMENTS === */
.tab.active {
    box-shadow: 0 0 24px rgba(37, 99, 235, 0.35), 0 2px 8px rgba(124, 58, 237, 0.12);
}

.dark-theme .tab.active {
    box-shadow: 0 0 25px rgba(96, 165, 250, 0.4);
}

/* === SMOOTH SCROLL BEHAVIOR === */
/* ��� �� html (�� �� body::before): ����� �������� �������� ���������� ���� � z-index:-1. ��� attachment:fixed � ���������� ���� � Safari/Chrome. */
/* smooth �� ����� ������ ��������� ��������� �������� � ������ �� ������� ������� */
html {
    scroll-behavior: auto;
    min-height: 100%;
    /* ������� ����: cyan > �������� ������ (��� ���������), � ������ �� ����������, ������ ���������� */
    background-color: #3a1582;
    background-image:
        radial-gradient(95% 70% at 8% 0%, rgba(0, 210, 255, 0.38), transparent 58%),
        radial-gradient(80% 55% at 92% 18%, rgba(124, 58, 237, 0.22), transparent 52%),
        linear-gradient(
            to bottom right,
            #5ad8ff 0%,
            #3b9cff 14%,
            #5b4dff 38%,
            #4f21c4 62%,
            #3d1588 82%,
            #2a0d5c 100%
        );
    background-attachment: fixed;
}

@media (min-width: 901px) {
    html {
        scroll-behavior: smooth;
    }
}

html:has(body.dark-theme),
html.dark-theme {
    background-color: #0c1222;
    background-image:
        radial-gradient(1000px 720px at 14% 8%, rgba(99, 102, 241, 0.28), transparent 56%),
        radial-gradient(880px 600px at 88% 12%, rgba(37, 99, 235, 0.22), transparent 50%),
        radial-gradient(900px 680px at 48% 96%, rgba(56, 189, 248, 0.1), transparent 52%),
        linear-gradient(168deg, #0c1222 0%, #111827 40%, #1e1b4b 100%);
    background-attachment: fixed;
}

/* fixed-��� �� iOS/Android ������ ������������ position:sticky � ����� � ��� ��������� ��� ������� */
@media (max-width: 900px) {
    html,
    html.dark-theme,
    html:has(body.dark-theme) {
        background-attachment: scroll;
    }

    .header-nav {
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }
}

/* �������������� ���� �����: ?16px �� ����� ������ � ��� ��������������� ���� � iOS Safari */
@media (max-width: 600px) {
    #speechText,
    #uploadText,
    #examText,
    #examAnswerText {
        font-size: 16px !important;
        line-height: 1.45 !important;
    }
}

/* === CUSTOM SCROLLBAR === */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(37, 99, 235, 0.06);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #2563eb, #7c3aed);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #3b82f6, #8b5cf6);
}

.dark-theme ::-webkit-scrollbar-track {
    background: rgba(30, 41, 59, 0.5);
}

.dark-theme ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #60A5FA, #8B5CF6);
}

/* === PROFILE MODAL POLISH === */
.profile-modal-wide {
    width: min(100%, 760px);
    max-width: 760px;
    max-height: min(88vh, 760px);
    padding: 32px;
    border-radius: 32px;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: rgba(37, 99, 235, 0.42) transparent;
    clip-path: inset(0 round 32px);
}

.profile-modal-wide::-webkit-scrollbar {
    width: 8px;
}

.profile-modal-wide::-webkit-scrollbar-track {
    background: transparent;
}

.profile-modal-wide::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #2563eb, #7c3aed);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.profile-modal-wide h2 {
    margin: 0 40px 18px 0;
    font-size: clamp(1.9rem, 3vw, 2.35rem);
    line-height: 1.05;
}

.profile-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.profile-kicker {
    margin-bottom: 8px;
}

.profile-title {
    font-size: clamp(1.2rem, 2vw, 1.45rem);
    line-height: 1.2;
}

.profile-info {
    margin: 0 0 20px;
    padding: 18px;
    gap: 14px;
    align-items: stretch;
    border-radius: 28px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0.22)),
        linear-gradient(135deg, rgba(var(--primary-rgb), 0.14), rgba(var(--secondary-rgb), 0.14));
    border: 1px solid rgba(var(--primary-rgb), 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.profile-info:first-of-type {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-info:first-of-type .profile-promo-card {
    grid-column: 1 / -1;
}

.profile-info p,
.profile-promo-card {
    min-height: 0;
    padding: 18px;
    gap: 10px;
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    background: white;
}

.profile-info p:hover,
.profile-promo-card:hover {
    transform: translateY(-2px);
    border-color: rgba(var(--primary-rgb), 0.18);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.09);
}

.profile-info strong {
    font-size: 0.96rem;
    line-height: 1.35;
}

.profile-info span {
    color: var(--text-primary);
    font-size: 1.08rem;
    line-height: 1.4;
    word-break: normal;
    overflow-wrap: anywhere;
}

.profile-subscription-actions,
.profile-password-panel {
    margin: 0 0 18px;
    padding: 16px 18px;
    border-radius: 22px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(255, 255, 255, 0.7);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.profile-actions-panel {
    margin-top: 8px;
    padding: 16px 18px 18px;
    border-radius: 24px;
    border: 1px solid rgba(var(--primary-rgb), 0.12);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(248, 250, 255, 0.92));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.profile-danger-panel {
    margin-top: 14px;
    padding: 16px 18px 18px;
    border-radius: 24px;
    border: 1px solid rgba(220, 38, 38, 0.14);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(254, 242, 242, 0.95));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.profile-section-label {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.profile-section-label--danger {
    color: #b91c1c;
}

.profile-danger-copy,
.profile-promo-copy,
.profile-promo-note {
    margin: 10px 0 0;
    color: var(--text-secondary);
    line-height: 1.55;
}

.profile-promo-note:empty {
    display: none;
}

.profile-danger-actions {
    margin-top: 14px;
}

.profile-promo-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-self: start;
}

.profile-promo-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.profile-promo-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--primary-color);
    background: rgba(var(--primary-rgb), 0.1);
}

.profile-promo-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    margin-top: 8px;
    align-items: center;
}

.profile-promo-form input {
    min-width: 0;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(248, 250, 252, 0.92);
    color: var(--text-secondary);
}

.profile-promo-form button {
    min-width: 120px;
    white-space: nowrap;
}

.profile-promo-form input:disabled,
.profile-promo-form button:disabled {
    opacity: 1;
    cursor: not-allowed;
}

.profile-promo-form button:disabled {
    color: var(--text-secondary);
}

.faq-preview {
    margin-top: 26px;
    margin-bottom: 28px;
    width: 100%;
    max-width: var(--vb-main-content-max-width);
    box-sizing: border-box;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid rgba(var(--primary-rgb), 0.14);
    background:
        radial-gradient(circle at top left, rgba(var(--primary-rgb), 0.12), transparent 34%),
        radial-gradient(circle at top right, rgba(var(--secondary-rgb), 0.1), transparent 28%),
        linear-gradient(180deg, rgba(255,255,255,0.97), rgba(246,249,255,0.98));
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.09);
    position: relative;
    z-index: 1;
}

.faq-preview .section-head {
    align-items: center;
}

.faq-preview .section-step-num {
    min-width: 68px;
    border-radius: 16px;
    padding: 8px 12px;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.12), rgba(var(--secondary-rgb), 0.08));
    color: var(--primary-color);
}

.faq-preview .section-desc {
    max-width: 760px;
    text-wrap: pretty;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: min-content;
    gap: 16px;
    align-items: start;
}

.faq-item {
    border-radius: 24px;
    border: 1px solid rgba(var(--primary-rgb), 0.14);
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(247,250,255,0.96));
    padding: 18px 20px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    height: fit-content;
    min-height: min-content;
}

.faq-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.1);
    border-color: rgba(var(--primary-rgb), 0.22);
}

.faq-item summary {
    cursor: pointer;
    list-style: none;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.45;
    padding: 8px 40px 8px 40px;
    position: relative;
    text-wrap: pretty;
    display: block;
    transition: color 0.2s ease;
}

.faq-item summary:hover {
    color: var(--primary-color);
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::before {
    content: '?';
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--primary-color);
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.12), rgba(var(--secondary-rgb), 0.08));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.faq-item[open] summary::before {
    transform: translateY(-50%) scale(1.06);
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.18), rgba(var(--secondary-rgb), 0.12));
}

.faq-item summary::after {
    content: '+';
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 800;
    color: var(--primary-color);
    background: rgba(var(--primary-rgb), 0.08);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.faq-item[open] summary::after {
    content: '?';
    transform: translateY(-50%) rotate(180deg);
    background: rgba(var(--primary-rgb), 0.12);
}

.faq-item p {
    margin: 14px 0 0;
    color: var(--text-secondary);
    line-height: 1.65;
    padding-left: 40px;
    text-wrap: pretty;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, margin 0.3s ease-out;
}

.faq-item[open] p {
    max-height: 500px;
    margin-top: 14px;
}

.profile-actions-row {
    align-items: stretch;
}

.profile-actions {
    gap: 12px;
    margin-top: 16px;
}

.profile-actions .btn,
.profile-password-actions .btn {
    min-width: 0;
    flex: 1 1 calc(50% - 12px);
    min-height: 48px;
    padding: 12px 18px;
    border-radius: 16px;
    font-size: 0.96rem;
    font-weight: 600;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.profile-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    text-align: center;
}

.profile-actions .btn-secondary {
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(var(--primary-rgb), 0.12);
}

.profile-actions .btn-secondary:hover:not(:disabled) {
    border-color: rgba(var(--primary-rgb), 0.26);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.12);
}

.profile-password-actions .btn {
    flex: 1 1 180px;
}

.profile-logout-btn {
    color: #b91c1c;
    border-color: rgba(220, 38, 38, 0.16);
}

.profile-logout-btn:hover:not(:disabled) {
    background: rgba(254, 242, 242, 0.95);
    border-color: rgba(220, 38, 38, 0.28);
    box-shadow: 0 14px 28px rgba(220, 38, 38, 0.12);
}

.dark-theme .profile-modal-wide {
    scrollbar-color: rgba(96, 165, 250, 0.7) transparent;
}

.dark-theme .profile-modal-wide::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(96, 165, 250, 0.95), rgba(139, 92, 246, 0.95));
}

.dark-theme .profile-head {
    border-bottom-color: rgba(71, 85, 105, 0.42);
}

.dark-theme .profile-info {
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.32), rgba(15, 23, 42, 0.12)),
        linear-gradient(135deg, rgba(96, 165, 250, 0.14), rgba(139, 92, 246, 0.14));
    border-color: rgba(96, 165, 250, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.dark-theme .profile-info p,
.dark-theme .profile-subscription-actions,
.dark-theme .profile-password-panel,
.dark-theme .profile-actions-panel,
.dark-theme .profile-danger-panel,
.dark-theme .profile-promo-card {
    background: rgba(15, 23, 42, 0.7);
    border-color: rgba(71, 85, 105, 0.36);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.dark-theme .profile-section-label {
    color: var(--dark-text-muted);
}

.dark-theme .profile-section-label--danger {
    color: #fca5a5;
}

.dark-theme .profile-danger-copy,
.dark-theme .profile-promo-copy,
.dark-theme .profile-promo-note,
.dark-theme .faq-item p {
    color: var(--dark-text-secondary);
}

.dark-theme .profile-promo-badge {
    color: var(--dark-primary);
    background: rgba(96, 165, 250, 0.12);
}

.dark-theme .profile-promo-form input {
    background: rgba(20, 32, 55, 0.88);
    border-color: rgba(71, 85, 105, 0.34);
    color: var(--dark-text-secondary);
}

.dark-theme .faq-item {
    background: linear-gradient(180deg, rgba(20,32,55,0.88), rgba(15,23,42,0.94));
    border-color: rgba(71, 85, 105, 0.34);
}

.dark-theme .faq-item summary {
    color: var(--dark-text);
}

.dark-theme .faq-preview {
    background:
        radial-gradient(circle at top left, rgba(96,165,250,0.12), transparent 34%),
        radial-gradient(circle at top right, rgba(139,92,246,0.14), transparent 28%),
        linear-gradient(180deg, rgba(18,28,48,0.96), rgba(12,20,36,0.98));
    border-color: rgba(71,85,105,0.32);
}

.dark-theme .faq-preview .section-step-num,
.dark-theme .faq-item summary::before,
.dark-theme .faq-item summary::after {
    color: var(--dark-primary);
    background: rgba(96,165,250,0.14);
}

.dark-theme .profile-actions .btn-secondary {
    background: rgba(20, 32, 55, 0.88);
    border-color: rgba(71, 85, 105, 0.34);
}

.dark-theme .profile-actions .btn-secondary:hover:not(:disabled) {
    border-color: rgba(96, 165, 250, 0.28);
    box-shadow: 0 16px 30px rgba(2, 8, 23, 0.3);
}

.dark-theme .profile-logout-btn {
    color: #fecaca;
    border-color: rgba(248, 113, 113, 0.2);
}

.dark-theme .profile-logout-btn:hover:not(:disabled) {
    background: rgba(69, 10, 10, 0.38);
    border-color: rgba(248, 113, 113, 0.34);
}

.dark-theme .profile-info p:hover {
    border-color: rgba(96, 165, 250, 0.28);
    box-shadow: 0 16px 30px rgba(2, 8, 23, 0.34);
}

.dark-theme .profile-info span {
    color: var(--dark-text);
}

@media (max-width: 600px) {
    .modal-content.profile-modal-wide {
        width: min(100%, calc(100vw - 8px));
        max-width: none;
        max-height: 86vh;
        padding: 18px 16px 20px;
        border-radius: 24px 24px 0 0;
        clip-path: inset(0 round 24px 24px 0 0);
        scrollbar-width: none;
    }

    .modal-content.profile-modal-wide::-webkit-scrollbar {
        width: 0;
        height: 0;
    }

    .profile-modal-wide h2 {
        margin-right: 32px;
        margin-bottom: 14px;
        font-size: 1.95rem;
    }

    .profile-head {
        margin-bottom: 14px;
        padding-bottom: 14px;
    }

    .profile-title {
        font-size: 1.18rem;
    }

    .profile-info {
        margin: 0 0 16px;
        padding: 12px;
        gap: 10px;
        border-radius: 22px;
    }

    .profile-info p {
        min-height: 0;
        padding: 12px 14px;
        gap: 6px;
        border-radius: 16px;
    }

    .profile-promo-card {
        min-height: 0;
        padding: 14px;
        border-radius: 16px;
    }

    .profile-info strong {
        font-size: 0.82rem;
    }

    .profile-info span {
        font-size: 0.98rem;
    }

    .profile-subscription-actions,
    .profile-password-panel,
    .profile-actions-panel,
    .profile-danger-panel {
        margin-bottom: 14px;
        padding: 14px;
        border-radius: 18px;
    }

    .profile-promo-form {
        grid-template-columns: 1fr;
        gap: 8px;
    }

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

    .profile-actions,
    .profile-password-actions {
        gap: 8px;
    }

    .profile-actions .btn,
    .profile-password-actions .btn {
        width: 100%;
        flex: 1 1 100%;
        min-height: 42px;
        padding: 10px 14px;
        font-size: 0.9rem;
        border-radius: 14px;
    }
}

@media (max-width: 920px) {
    .profile-info {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .hero-section h1 {
        max-width: 100%;
        font-size: clamp(2rem, 9.4vw, 2.85rem);
        line-height: 1.06;
    }
}

body.low-performance-mode,
html.low-performance-mode {
    --transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
    --transition-fast: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
    --transition-slow: color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, opacity 0.25s ease;
    --glass-blur: none;
}

body.low-performance-mode .header-nav,
body.low-performance-mode .nav-btn,
body.low-performance-mode .container,
body.low-performance-mode .surface-card,
body.low-performance-mode .hero-badge,
body.low-performance-mode .hero-feature-card,
body.low-performance-mode .tab,
body.low-performance-mode .btn-secondary,
body.low-performance-mode .summary-card,
body.low-performance-mode .chart-card,
body.low-performance-mode .modal,
body.low-performance-mode .modal-content,
body.low-performance-mode .verification-overlay {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

body.low-performance-mode .header-nav,
body.low-performance-mode .container,
body.low-performance-mode .surface-card,
body.low-performance-mode .hero-feature-card,
body.low-performance-mode .summary-card,
body.low-performance-mode .chart-card,
body.low-performance-mode .modal-content {
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08) !important;
}

body.low-performance-mode .hero-section .subtitle {
    font-family: var(--font-primary), sans-serif;
}

body.low-performance-mode .hero-feature-card,
body.low-performance-mode .hero-section h1,
body.low-performance-mode .hero-section .subtitle,
body.low-performance-mode .hero-badge,
body.low-performance-mode .status-dot,
body.low-performance-mode .status-dot::after,
body.low-performance-mode .scroll-top-fab__arrow,
body.low-performance-mode .btn-primary.recording,
body.low-performance-mode .btn-danger.recording,
body.low-performance-mode .analysis:not(.hidden),
body.low-performance-mode .analysis:not(.hidden) .chart-summary .summary-card,
body.low-performance-mode .analysis:not(.hidden) .chart-card {
    animation: none !important;
}

body.low-performance-mode .btn,
body.low-performance-mode .nav-btn,
body.low-performance-mode .hero-feature-card,
body.low-performance-mode .surface-card,
body.low-performance-mode .profile-info p {
    will-change: auto !important;
}

body.low-performance-mode .btn:hover:not(:disabled),
body.low-performance-mode .nav-btn:hover,
body.low-performance-mode .hero-feature-card:hover,
body.low-performance-mode .surface-card:hover,
body.low-performance-mode .profile-info p:hover {
    transform: none !important;
}

/* === SELECTION STYLES === */
::selection {
    background: rgba(59, 130, 246, 0.25);
    color: inherit;
}

.dark-theme ::selection {
    background: rgba(96, 165, 250, 0.3);
}

/* === SELECTION COLOR === */
::selection {
    background: rgba(59, 130, 246, 0.3);
    color: inherit;
}

.dark-theme ::selection {
    background: rgba(139, 92, 246, 0.4);
}

/* === ACCESSIBILITY: REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .blurry-blob-wrapper .blur-blob-first,
    .blurry-blob-wrapper .blur-blob-second {
        animation: none !important;
    }
}

/* =====================================================
   ADDITIONAL BUTTON STYLES FROM USER REQUEST
   ===================================================== */

/* === BUTTON WITH INSET SHADOW (from user request) === */
.btn-inset {
    --color-back: #030f14;
    border-radius: 0.5em;
    box-shadow:
        inset 0px -6px 18px -6px rgba(3, 15, 20, 0),
        inset rgba(54, 69, 75, 1) -1px -1px 6px 0px,
        inset 12px 0px 12px -6px rgba(3, 15, 20, 0),
        inset -12px 0px 12px -6px rgba(3, 15, 20, 0),
        rgba(54, 69, 75, 1) -1px -1px 6px 0px;
    border: solid 2px #030f14;
    cursor: pointer;
    font-size: 18px;
    padding: 0.7em 1.7em;
    outline: none;
    transition: all 0.3s;
    user-select: none;
    background: var(--color-back);
    color: #d0a756;
    font-weight: 700;
    font-family: var(--font-primary);
}

.btn-inset:hover {
    box-shadow:
        inset 0px -6px 18px -6px rgba(3, 15, 20, 1),
        inset 0px 6px 18px -6px rgba(3, 15, 20, 1),
        inset 12px 0px 12px -6px rgba(3, 15, 20, 0),
        inset -12px 0px 12px -6px rgba(3, 15, 20, 0),
        -1px -1px 6px 0px rgba(54, 69, 75, 1);
}

.btn-inset:active {
    box-shadow:
        inset 0px -12px 12px -6px rgba(3, 15, 20, 1),
        inset 0px 12px 12px -6px rgba(3, 15, 20, 1),
        inset 12px 0px 12px -6px rgba(3, 15, 20, 1),
        inset -12px 0px 12px -6px rgba(3, 15, 20, 1),
        -1px -1px 6px 0px rgba(54, 69, 75, 1);
}

.btn-inset .text {
    color: #d0a756;
    font-weight: 700;
    margin: auto;
    transition: all 0.3s;
    width: fit-content;
}

.btn-inset:hover .text {
    transform: scale(0.9);
}

.btn-inset:active .text {
    transform: scale(0.8);
}

/* === BUTTON WITH SVG ICON SLIDE === */
.btn-svg-slide {
    font-family: inherit;
    font-size: 20px;
    background: #212121;
    color: white;
    padding: 0.7em 1em;
    padding-left: 0.9em;
    display: flex;
    align-items: center;
    cursor: pointer;
    border: none;
    border-radius: 15px;
    font-weight: 1000;
    font-family: var(--font-primary);
    transition: all 0.3s ease;
}

.btn-svg-slide span {
    display: block;
    margin-left: 0.3em;
    transition: all 0.3s ease-in-out;
}

.btn-svg-slide svg {
    display: block;
    transform-origin: center center;
    transition: transform 0.3s ease-in-out;
}

.btn-svg-slide:hover {
    background: #000;
}

.btn-svg-slide:hover .svg-wrapper {
    transform: scale(1.25);
    transition: 0.5s linear;
}

.btn-svg-slide:hover svg {
    transform: translateX(1.2em) scale(1.1);
    fill: #fff;
}

.btn-svg-slide:hover span {
    opacity: 0;
    transition: 0.5s linear;
}

.btn-svg-slide:active {
    transform: scale(0.95);
}

/* === BUTTON WITH PULSE RING (for recording/mic) === */
.btn-pulse-ring {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    font-family: var(--font-primary);
    transition: all 0.3s ease;
    overflow: visible;
}

.btn-pulse-ring::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    border: 2px solid rgba(239, 68, 68, 0.5);
    animation: pulseRing 2s ease-out infinite;
}

.btn-pulse-ring::after {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: inherit;
    border: 2px solid rgba(239, 68, 68, 0.3);
    animation: pulseRing 2s ease-out infinite;
    animation-delay: 0.5s;
}

@keyframes pulseRing {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

.btn-pulse-ring:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

/* === BUTTON WITH GRADIENT BORDER ANIMATION === */
.btn-animated-border {
    position: relative;
    padding: 14px 32px;
    border: none;
    border-radius: 12px;
    background: #1C1A1C;
    color: white;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    font-family: var(--font-primary);
    transition: all 0.3s ease;
    z-index: 1;
}

.btn-animated-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 14px;
    background: conic-gradient(from 0deg, #3B82F6, #8B5CF6, #EC4899, #3B82F6);
    animation: rotateBorder 3s linear infinite;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-animated-border:hover::before {
    opacity: 1;
}

.btn-animated-border:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

/* === BUTTON WITH MORPHING SHAPE === */
.btn-morph {
    padding: 14px 32px;
    border: none;
    border-radius: 30% / 200%;
    background: linear-gradient(135deg, #3B82F6, #8B5CF6);
    color: white;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    font-family: var(--font-primary);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-morph:hover {
    border-radius: 10% / 200%;
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

/* ������ ������������� ������ */
.typing {
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    border-right: 3px solid #000;
    font-size: 42px;
    animation: typing 3s steps(var(--chars, 30)) infinite alternate, caret 0.6s step-end infinite;
}

/* �������� ������ � �������� */
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

/* �������� ������ */
@keyframes caret {
    50% { border-color: transparent; }
}

/* ��������� ��� ��������� ��������� */
@media (max-width: 768px) {
    .typing {
        font-size: 28px;
        border-right: 2px solid #000;
    }
}

.btn-morph:active {
    border-radius: 20% / 200%;
    transform: scale(0.98);
}

/* === BUTTON WITH SHIMMER EFFECT === */
.btn-shimmer {
    position: relative;
    padding: 14px 32px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #3B82F6, #2563eb);
    color: white;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    font-family: var(--font-primary);
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-shimmer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-shimmer:hover::before {
    left: 100%;
}

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

/* === BUTTON WITH DOT INDICATORS === */
.btn-dots {
    position: relative;
    padding: 14px 32px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #3B82F6, #8B5CF6);
    color: white;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    font-family: var(--font-primary);
    transition: all 0.3s ease;
}

.btn-dots::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    width: 24px;
    height: 4px;
    background: rgba(59, 130, 246, 0.3);
    border-radius: 2px;
}

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

/* === BUTTON WITH WAVE ANIMATION === */
.btn-wave {
    position: relative;
    padding: 14px 32px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #3B82F6, #8B5CF6);
    color: white;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    font-family: var(--font-primary);
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-wave::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    transition: height 0.3s ease;
}

.btn-wave:hover::before {
    height: 100%;
}

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

/* === DARK THEME OVERRIDES FOR NEW BUTTONS === */
.dark-theme .btn-inset {
    --color-back: #1e293b;
    border-color: #334155;
    color: #60A5FA;
}

.dark-theme .btn-svg-slide {
    background: #1e293b;
    color: #60A5FA;
}

.dark-theme .btn-svg-slide:hover {
    background: #0f172a;
}

.dark-theme .btn-animated-border {
    background: #1e293b;
}

.dark-theme .btn-morph {
    background: linear-gradient(135deg, #60A5FA, #8B5CF6);
}

.dark-theme .btn-shimmer {
    background: linear-gradient(135deg, #60A5FA, #3B82F6);
}

.dark-theme .btn-dots {
    background: linear-gradient(135deg, #60A5FA, #8B5CF6);
}

.dark-theme .btn-wave {
    background: linear-gradient(135deg, #60A5FA, #8B5CF6);
}

/* === TAB ENHANCEMENTS === */
.tab {
    position: relative;
    overflow: visible;
}

.tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #3B82F6, #8B5CF6);
    transition: all 0.4s ease;
    transform: translateX(-50%);
    border-radius: 3px 3px 0 0;
}

.tab.active::after {
    width: 80%;
}

.tab:hover::after {
    width: 60%;
}

/* === PROGRESS BAR ENHANCEMENTS === */
.progress-bar-fill {
    position: relative;
    overflow: hidden;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progressShimmer 2s infinite;
}

@keyframes progressShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* === METRIC CARD ENHANCEMENTS === */
.metric-card {
    position: relative;
    overflow: hidden;
}

.metric-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.08), transparent 60%);
    transition: all 0.5s ease;
    pointer-events: none;
}

.metric-card:hover::after {
    top: -30%;
    right: -30%;
}

/* === CHART CARD ENHANCEMENTS === */
.chart-card {
    position: relative;
    overflow: hidden;
}

.chart-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3B82F6, #8B5CF6, #EC4899);
    opacity: 0.7;
}

/* === INPUT ENHANCEMENTS === */
input:focus,
textarea:focus,
select:focus {
    position: relative;
}

/* === LOADING STATES === */
.loading-shimmer {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.05) 25%, rgba(59, 130, 246, 0.1) 50%, rgba(59, 130, 246, 0.05) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

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

/* === MODAL ENHANCEMENTS === */
.modal-content {
    position: relative;
    overflow: visible;
}

.modal-content::before {
    content: '';
    display: none;
}

/* === NOTIFICATION DOT === */
.notification-dot {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ef4444;
    animation: notificationPulse 2s ease-in-out infinite;
}

@keyframes notificationPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

/* === WAVE DIVIDER === */
.wave-divider {
    position: relative;
    height: 60px;
    overflow: hidden;
}

.wave-divider::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%233B82F6' fill-opacity='0.1' d='M0,192L48,197.3C96,203,192,213,288,229.3C384,245,480,267,576,250.7C672,235,768,181,864,181.3C960,181,1056,235,1152,234.7C1248,235,1344,181,1392,154.7L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E") no-repeat bottom;
    background-size: 50% 100%;
    animation: waveMove 10s linear infinite;
}

@keyframes waveMove {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* === PAGE TRANSITION ANIMATIONS === */
@keyframes pageEnter {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.container {
    animation: pageEnter 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* === STAGGERED CHILD ANIMATIONS === */
.hero-feature-card,
.metric-card,
.stat,
.level-card,
.challenge-card {
    animation: staggerFadeIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.hero-feature-card:nth-child(1),
.metric-card:nth-child(1),
.stat:nth-child(1),
.level-card:nth-child(1),
.challenge-card:nth-child(1) { animation-delay: 0.05s; }

.hero-feature-card:nth-child(2),
.metric-card:nth-child(2),
.stat:nth-child(2),
.level-card:nth-child(2),
.challenge-card:nth-child(2) { animation-delay: 0.1s; }

.hero-feature-card:nth-child(3),
.metric-card:nth-child(3),
.stat:nth-child(3),
.level-card:nth-child(3),
.challenge-card:nth-child(3) { animation-delay: 0.15s; }

.hero-feature-card:nth-child(4) { animation-delay: 0.2s; }
.hero-feature-card:nth-child(5) { animation-delay: 0.25s; }

@keyframes staggerFadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === RESPONSIVE FAB === */
@media (max-width: 768px) {
    .speed-dial {
        bottom: 20px;
        right: 20px;
    }

    .speed-dial-trigger {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    .speed-dial-action {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .speed-dial {
        bottom: 16px;
        right: 16px;
    }

    .speed-dial-trigger {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }

    .speed-dial-action {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .speed-dial-action .tooltip {
        display: none;
    }
}

/* Glassy card for transparent UI sections - airy */
.glass-card {
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(10px) saturate(118%);
    -webkit-backdrop-filter: blur(10px) saturate(118%);
    border: 1px solid rgba(255,255,255,0.94);
    border-radius: var(--border-radius-xl);
    padding: 24px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}
.glass-card:hover {
    background: rgba(255,255,255,0.98);
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}
.dark-theme .glass-card {
    background: rgba(20,32,55,0.72);
    border-color: rgba(71,85,105,0.25);
}
.dark-theme .glass-card:hover {
    background: rgba(25,40,65,0.85);
}

/* === DECORATIVE SHIMMER ORBS (���) � ������� blur+�������� ���� jank �� ������ GPU/�� === */
.shimmer-orb {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: -2;
    contain: strict;
    filter: blur(32px);
    opacity: 0.16;
    animation: none;
    transform: translateZ(0);
}

body:not(.dark-theme) .shimmer-orb {
    opacity: 0.07;
    filter: blur(28px);
}

.shimmer-orb--primary {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59,130,246,0.4) 0%, transparent 70%);
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.shimmer-orb--accent {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(139,92,246,0.35) 0%, transparent 70%);
    bottom: -150px;
    right: -150px;
    animation-delay: -7s;
}

.shimmer-orb--secondary {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(59,130,246,0.25) 0%, transparent 70%);
    top: 40%;
    right: 10%;
    animation-delay: -14s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -20px) scale(1.05); }
    50% { transform: translate(-20px, 30px) scale(0.95); }
    75% { transform: translate(15px, 15px) scale(1.02); }
}

/* Gradient text utility */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Subtle sparkle effect on hover */
.sparkle-effect {
    position: relative;
    overflow: hidden;
}
.sparkle-effect::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 60%);
    transform: scale(0);
    transition: transform 0.6s ease;
    pointer-events: none;
}
.sparkle-effect:hover::after {
    transform: scale(1);
}

/* Loading shimmer animation */
@keyframes shimmerLoading {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.loading-shimmer {
    background: linear-gradient(90deg,
        rgba(255,255,255,0.3) 0%,
        rgba(255,255,255,0.1) 50%,
        rgba(255,255,255,0.3) 100%);
    background-size: 200% 100%;
    animation: shimmerLoading 1.5s ease-in-out infinite;
}

.dark-theme .loading-shimmer {
    background: linear-gradient(90deg,
        rgba(30,41,59,0.3) 0%,
        rgba(30,41,59,0.1) 50%,
        rgba(30,41,59,0.3) 100%);
    background-size: 200% 100%;
    animation: shimmerLoading 1.5s ease-in-out infinite;
}

/* Bottom legal area with offer placeholder button */
.legal-footer {
    margin: 20px auto 96px;
    width: min(1100px, calc(100% - 24px));
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(59, 130, 246, 0.18);
    border-radius: 20px;
    padding: 14px 16px;
    box-shadow: var(--shadow-sm);
}

.legal-footer-inner {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.legal-link-btn,
.legal-offer-btn {
    border: 1px solid rgba(59, 130, 246, 0.28);
    background: rgba(255, 255, 255, 0.98);
    color: var(--text-primary);
    border-radius: var(--border-radius-full);
    padding: 12px 20px;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    opacity: 1;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
}

.legal-link-btn {
    text-decoration: none;
}

.legal-link-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.dark-theme .legal-offer-btn {
    background: rgba(20, 32, 55, 0.82);
    border-color: rgba(96, 165, 250, 0.22);
    color: var(--dark-text-secondary);
}

.dark-theme .legal-link-btn {
    background: rgba(20, 32, 55, 0.82);
    border-color: rgba(96, 165, 250, 0.22);
    color: var(--dark-text-secondary);
}

.dark-theme .legal-footer {
    background: rgba(15, 23, 42, 0.88);
    border-color: rgba(96, 165, 250, 0.22);
}

@media (max-width: 768px) {
    .legal-footer {
        margin-bottom: 84px;
    }

    .legal-offer-btn {
        width: 100%;
        max-width: 360px;
        padding: 11px 16px;
        font-size: 0.9rem;
        text-align: center;
    }
}

.legal-support {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.legal-support-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid rgba(59, 130, 246, 0.18);
    background: rgba(255, 255, 255, 0.88);
    transition: var(--transition-fast);
}

.legal-support-link:hover {
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.dark-theme .legal-support-link {
    color: var(--dark-text-secondary);
    border-color: rgba(96, 165, 250, 0.18);
    background: rgba(20, 32, 55, 0.68);
}

.legal-owner {
    margin-top: 10px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.4;
}

.dark-theme .legal-owner {
    color: var(--dark-text-secondary);
}

.consent-group {
    margin: 10px 0 14px;
}

.consent-row {
    align-items: flex-start;
    gap: 10px;
    margin: 8px 0;
}

.consent-row input[type="checkbox"] {
    margin-top: 2px;
}

.consent-row span {
    font-size: 0.86rem;
    line-height: 1.4;
    color: var(--text-secondary);
}

.consent-row a,
.consent-hint a {
    color: var(--primary-color);
    text-decoration: underline;
}

.consent-hint {
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 14px;
    z-index: 1200;
    display: flex;
    justify-content: center;
}

.cookie-banner--hidden {
    display: none;
}

.cookie-banner-content {
    width: min(860px, 100%);
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    padding: 14px;
}

.cookie-banner-title {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.cookie-banner-text {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.cookie-categories {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 10px 0;
}

.cookie-category {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.cookie-category input[type="checkbox"],
.consent-row input[type="checkbox"],
.checkbox-row input[type="checkbox"],
.learning-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    margin: 0;
    border: 2px solid rgba(59, 130, 246, 0.65);
    border-radius: 4px;
    background: #ffffff;
    cursor: pointer;
    -webkit-appearance: none !important;
    appearance: none !important;
    display: inline-block;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 12px 12px;
}

.cookie-category input[type="checkbox"]:checked,
.consent-row input[type="checkbox"]:checked,
.checkbox-row input[type="checkbox"]:checked,
.learning-option input[type="checkbox"]:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%23fff' d='M16.7 5.3a1 1 0 0 1 0 1.4l-7.2 7.2a1 1 0 0 1-1.4 0L3.3 9.1a1 1 0 1 1 1.4-1.4l4.1 4.1 6.5-6.5a1 1 0 0 1 1.4 0z'/%3E%3C/svg%3E");
}

.cookie-category input[type="checkbox"]:disabled {
    opacity: 1;
    cursor: default;
}

.cookie-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 8px 0 6px;
}

.dark-theme .consent-row span,
.dark-theme .consent-hint,
.dark-theme .cookie-banner-text,
.dark-theme .cookie-category {
    color: var(--dark-text-secondary);
}

body.dark-theme .cookie-category input[type="checkbox"],
body.dark-theme .consent-row input[type="checkbox"],
body.dark-theme .checkbox-row input[type="checkbox"],
body.dark-theme .learning-option input[type="checkbox"] {
    background: rgba(15, 23, 42, 0.95) !important;
    border-color: rgba(148, 163, 184, 0.9) !important;
}

body.dark-theme .cookie-category input[type="checkbox"]:checked,
body.dark-theme .consent-row input[type="checkbox"]:checked,
body.dark-theme .checkbox-row input[type="checkbox"]:checked,
body.dark-theme .learning-option input[type="checkbox"]:checked {
    background-color: #60a5fa !important;
    border-color: #60a5fa !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%230b1220' d='M16.7 5.3a1 1 0 0 1 0 1.4l-7.2 7.2a1 1 0 0 1-1.4 0L3.3 9.1a1 1 0 1 1 1.4-1.4l4.1 4.1 6.5-6.5a1 1 0 0 1 1.4 0z'/%3E%3C/svg%3E") !important;
}

.dark-theme .cookie-banner-content {
    background: rgba(15, 23, 42, 0.96);
    border-color: rgba(96, 165, 250, 0.25);
}

.dark-theme .cookie-banner-title {
    color: var(--dark-text);
}

@media (max-width: 768px) {
    .chart-card--main .chart-wrap {
        min-height: 320px !important;
        height: 320px;
    }

    .chart-card .chart-wrap--bar {
        min-height: 230px !important;
        height: 230px;
    }

    .chart-wrap canvas {
        max-height: none !important;
    }

    .cookie-category input[type="checkbox"] {
        width: 22px;
        height: 22px;
        min-width: 22px;
        min-height: 22px;
        background-size: 14px 14px;
    }

    .cookie-category {
        gap: 8px;
    }

    .faq-preview {
        padding: 18px 16px;
        border-radius: 24px;
    }

    .faq-preview .section-head {
        gap: 12px;
        align-items: flex-start;
    }

    .faq-preview .section-step-num {
        min-width: 60px;
        font-size: 0.95rem;
    }
}

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

@media (max-width: 640px) {
    .analysis {
        padding: 16px 12px 18px;
    }

    .analysis-title {
        font-size: 1.3rem;
        line-height: 1.2;
    }

    .chart-card {
        padding: 16px 12px 18px;
        border-radius: 20px;
    }

    .chart-header {
        gap: 10px;
        margin-bottom: 12px;
    }

    .chart-icon {
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
        border-radius: 10px;
    }

    .chart-header-text {
        min-width: 0;
    }

    .chart-card-title {
        font-size: 1rem;
        line-height: 1.25;
    }

    .chart-card-desc {
        font-size: 0.82rem;
        line-height: 1.4;
    }

    .chart-meta {
        padding: 6px 10px;
        border-radius: 10px;
    }

    .chart-value {
        font-size: 1.35rem;
    }

    .chart-wrap {
        padding: 10px 0 4px;
        min-height: 0;
    }

    .chart-wrap--radar,
    .chart-card--main .chart-wrap {
        min-height: 300px !important;
        height: 300px;
    }

    .chart-wrap--bar,
    .chart-card .chart-wrap--bar {
        min-height: 210px !important;
        height: 210px;
    }

    .tempo-range {
        padding: 8px 10px;
        font-size: 0.66rem;
        gap: 8px;
    }

    .tempo-stats {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        margin-top: 12px;
        padding-top: 12px;
    }

    .tempo-stat {
        padding: 8px 10px;
        border-radius: 12px;
    }

    .chart-insight {
        margin-top: 12px;
    }

    .faq-item {
        padding: 16px 14px;
        border-radius: 20px;
    }

    .faq-item summary {
        padding: 8px 40px 8px 40px;
        font-size: 0.98rem;
        line-height: 1.45;
    }

    .faq-item p {
        padding-left: 40px;
        font-size: 0.9rem;
        line-height: 1.55;
    }
}

/*
 * ����� ���� ����� ��� ������ ��: ����� �� <html> ������� �� index.html (������ ������).
 * localStorage: vbPerfTune = "1" � ��������; "0" � ��������� ����-����� � ����� �����.
 */
html.vb-perf-tune {
    --glass-blur: blur(5px) saturate(108%);
}

html.vb-perf-tune .shimmer-orb {
    display: none !important;
}

html.vb-perf-tune .header-nav:hover {
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.12), 0 2px 8px rgba(15, 23, 42, 0.06) !important;
}


/* ���������� �������� ��� FAQ �� ������ ����������� � ��������� */
@media (max-width: 768px), (prefers-reduced-motion: reduce) {
    .faq-item {
        transition: none !important;
    }
    .faq-item:hover {
        transform: none !important;
    }
}

html.vb-perf-tune .faq-item {
    transition: none !important;
}

html.vb-perf-tune .faq-item:hover {
    transform: none !important;
}

/* Final visual overrides: profile and account card polish */
.stat.stat--hero-learning.stat--hero-account-only,
.stat.stat--hero-learning.stat--hero-account-only * {
    color: #fff !important;
}

.stat.stat--hero-learning.stat--hero-account-only .stat-sublabel,
.stat.stat--hero-learning.stat--hero-account-only .hero-account-xp,
.stat.stat--hero-learning.stat--hero-account-only .stat-sublabel--muted {
    color: rgba(255, 255, 255, 0.92) !important;
}

.stat.stat--hero-learning.stat--hero-account-only .progress-bar--account {
    background: rgba(255, 255, 255, 0.24) !important;
}

.stat.stat--hero-learning.stat--hero-account-only .progress-fill {
    background: #fff !important;
}

.audio-upload-panel {
    width: min(100%, 720px);
    margin: 18px auto 8px;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    display: grid;
    gap: 10px;
    text-align: left;
}

.report-upload-panel {
    margin: 12px 0 18px;
    display: grid;
    gap: 10px;
}

.file-drop-zone {
    border: 1.5px dashed rgba(37, 99, 235, 0.38);
    border-radius: 18px;
    padding: 18px;
    display: grid;
    gap: 8px;
    place-items: center;
    text-align: center;
    color: var(--text-secondary);
    background: rgba(37, 99, 235, 0.045);
    transition: border-color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
    cursor: pointer;
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

.file-drop-zone::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.5px;
    background: linear-gradient(115deg, var(--primary-color), var(--accent-color), var(--success-color));
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity var(--transition-fast);
    pointer-events: none;
}

.file-drop-zone--active,
.file-drop-zone:focus-visible {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.12);
    outline: none;
    transform: translateY(-1px);
    box-shadow: 0 16px 38px rgba(var(--primary-rgb), 0.16);
}

.file-drop-zone--active::before,
.file-drop-zone:focus-visible::before {
    opacity: 1;
}

.file-drop-zone__icon {
    font-size: 1.55rem;
    transition: transform var(--transition-fast);
}

.file-drop-zone__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.35;
}

.file-drop-zone__hint {
    font-size: 0.78rem;
    line-height: 1.45;
    font-weight: 500;
    color: var(--text-muted);
    max-width: 34rem;
}

.file-drop-zone--active .file-drop-zone__icon {
    animation: vbIconBounce 0.72s var(--ease-out) infinite;
}

.file-upload-error {
    margin: 0;
    color: var(--danger-color);
    font-size: 0.92rem;
}

.file-upload-error:empty {
    display: none;
}

.audio-upload-label {
    display: grid;
    gap: 4px;
    cursor: pointer;
}

.audio-upload-label__title {
    font-weight: 700;
    color: var(--text-color);
}

.audio-upload-label__hint,
.audio-file-preview,
.file-preview-card {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.45;
}

.file-preview-card {
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 16px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.62);
}

.file-preview-card:empty,
.audio-file-preview:empty {
    display: none;
    padding: 0;
    border: none;
    background: transparent;
}

.file-preview-card__head {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    align-items: center;
}

.file-preview-card__head strong,
.file-preview-card__head span {
    display: block;
}

.file-preview-card__icon {
    font-size: 1.35rem;
}

.file-preview-card audio {
    width: 100%;
    margin-top: 10px;
}

.analysis-option-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 8px auto 0;
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.analysis-option-toggle input {
    accent-color: var(--primary-color);
}

.cache-hint {
    margin: 10px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.cache-hint--hit {
    color: var(--success-color);
}

.cache-hint--warn {
    color: var(--warning-color);
}

.report-preview-snippet {
    margin: 10px 0;
    color: var(--text-color);
}

.audio-file-preview--ok {
    color: var(--success-color);
}

.audio-file-preview--error {
    color: var(--danger-color);
}

.audio-upload-panel input[type="file"] {
    width: 100%;
}

body.dark-theme .audio-upload-panel {
    background: rgba(15, 23, 42, 0.68);
    border-color: rgba(148, 163, 184, 0.24);
}

.analysis-progress {
    width: min(100%, 680px);
    margin: 14px auto 8px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.28);
}

.analysis-progress.hidden,
.analysis-action-row .hidden {
    display: none !important;
}

.analysis-progress-head,
.analysis-export-actions,
.analysis-action-row,
.report-eval-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.analysis-progress-head {
    justify-content: space-between;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.analysis-progress-head-main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1 1 auto;
}

.analysis-progress-icon {
    font-size: 1.2rem;
    line-height: 1;
    flex-shrink: 0;
    transition: transform 0.35s var(--ease-out);
}

.analysis-progress[data-analysis-stage='transcribing'] .analysis-progress-icon,
.analysis-progress[data-analysis-stage='extracting'] .analysis-progress-icon,
.analysis-progress[data-analysis-stage='analyzing'] .analysis-progress-icon {
    animation: vbIconBounce 1.15s ease-in-out infinite;
}

.analysis-progress-percent {
    font-weight: 700;
    color: var(--primary-color);
}

.analysis-progress-track {
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(148, 163, 184, 0.24);
}

.analysis-progress-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: width 0.55s var(--ease-out), background 0.45s var(--ease-out);
    position: relative;
    overflow: hidden;
}

.analysis-progress-fill::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transform: translateX(-100%);
    animation: shimmer 1.7s linear infinite;
}

.analysis-progress--queued .analysis-progress-fill {
    background: rgba(148, 163, 184, 0.75);
}

.analysis-progress--processing .analysis-progress-fill {
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--success-color));
}

.analysis-progress--done .analysis-progress-fill {
    background: var(--success-color);
}

.analysis-progress--done ~ .analysis-action-row .btn,
.btn.vb-pulse-success {
    animation: vbPulseSuccess 0.8s var(--ease-out) both;
}

.analysis-progress--error .analysis-progress-fill {
    background: var(--danger-color);
    width: 100% !important;
}

.btn.vb-error-shake {
    animation: vbErrorShake 0.36s ease both;
}

.analysis-export-actions {
    margin: 0 0 18px;
}

.report-eval-actions {
    justify-content: center;
    margin: 0 0 14px;
}

.analysis-export-actions .btn,
.report-eval-actions .btn {
    margin: 0;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 520px) {
    .analysis-export-actions,
    .report-eval-actions {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 10px;
    }

    .analysis-export-actions .btn,
    .report-eval-actions .btn {
        width: 100%;
        max-width: none;
        min-height: 46px;
    }
}

#transcriptPanel pre {
    max-height: 280px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    padding: 12px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.06);
    color: var(--text-color);
}

.ai-accordion {
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.82);
    padding: 14px 16px;
    margin: 12px 0;
}

.ai-accordion--feedback-summary {
    padding: 14px 16px 16px;
}

.ai-accordion > summary {
    cursor: pointer;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    list-style: none;
    min-height: 48px;
    -webkit-tap-highlight-color: transparent;
}

.ai-accordion__title {
    flex: 1 1 auto;
    min-width: 0;
    justify-self: unset;
    font-size: var(--text-heading-md);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.ai-accordion__score {
    flex-shrink: 0;
    justify-self: unset;
    font-size: clamp(1.05rem, 3.5vw, 1.2rem);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
}

.ai-accordion > summary .ai-score-badge {
    flex-shrink: 0;
    justify-self: unset;
}

.ai-score-badge {
    display: inline-flex;
    align-items: baseline;
    gap: 1px;
    padding: 6px 13px;
    border-radius: 999px;
    font-variant-numeric: tabular-nums;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.14), rgba(139, 92, 246, 0.11));
    border: 1px solid rgba(59, 130, 246, 0.28);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.65),
        0 2px 10px rgba(37, 99, 235, 0.08);
}

.ai-score-badge__value {
    font-size: clamp(1.05rem, 3.4vw, 1.22rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
    color: var(--primary-color);
}

.ai-score-badge__suffix {
    font-size: 0.74em;
    font-weight: 700;
    color: var(--text-secondary);
    opacity: 0.88;
}

.analysis-collapsible--hidden {
    display: none !important;
}

.model-feedback-toggle {
    margin-top: 12px;
    width: 100%;
    max-width: 100%;
    justify-content: center;
}

.transcript-panel-shell {
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.82);
    padding: 14px 16px;
    margin: 14px 0;
}

body.dark-theme .transcript-panel-shell {
    background: rgba(15, 23, 42, 0.72);
    border-color: rgba(148, 163, 184, 0.24);
}

.transcript-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.transcript-panel-heading__title {
    margin: 0;
    font-size: var(--text-heading-md);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.transcript-duration-chip {
    font-size: 0.82rem;
    font-weight: 700;
    padding: 6px 11px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.22);
    color: var(--primary-color);
    font-variant-numeric: tabular-nums;
}

.transcript-body-toggle {
    margin-top: 10px;
    width: 100%;
    max-width: 100%;
    justify-content: center;
}

.ai-accordion > summary::-webkit-details-marker {
    display: none;
}

.ai-accordion > summary::after {
    content: '';
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    margin-left: auto;
    border-right: 2px solid var(--text-secondary);
    border-bottom: 2px solid var(--text-secondary);
    transform: rotate(45deg);
    transform-origin: 50% 50%;
    transition: transform 0.2s ease;
}

.ai-accordion:not([open]) > summary::after {
    transform: rotate(-135deg);
}

.ai-accordion--recommendations .ai-accordion__title {
    text-wrap: balance;
    hyphens: manual;
}

.ai-accordion__body-list {
    margin: 10px 0 0;
    padding-left: 1.15rem;
}

.ai-accordion .ai-summary-box p,
.ai-accordion .report-eval-dim p {
    font-size: var(--text-caption);
    line-height: 1.55;
}

.ai-accordion .report-eval-dim strong {
    font-size: var(--text-body);
}

.audio-result-player audio {
    width: 100%;
    margin: 12px 0;
}

.audio-result-player__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.audio-result-player__row audio {
    flex: 1 1 220px;
    min-width: min(100%, 240px);
    margin: 12px 0;
}

@media (max-width: 540px) {
    .audio-result-player__row {
        flex-direction: column;
        align-items: stretch;
    }

    .audio-result-player__row audio {
        flex: 1 1 auto;
        min-width: 0;
        width: 100%;
    }

    .playback-rate-toolbar {
        padding-top: 2px;
    }
}

.playback-rate-toolbar {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    align-items: center;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding: 4px 2px 6px;
}

.playback-rate-btn {
    flex: 0 0 auto;
    appearance: none;
    font: inherit;
    font-weight: 700;
    font-size: 0.82rem;
    line-height: 1;
    padding: 8px 13px;
    min-height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(37, 99, 235, 0.28);
    background: rgba(255, 255, 255, 0.92);
    color: var(--text-primary);
    cursor: pointer;
    transition:
        background var(--transition-fast, 0.15s ease),
        border-color var(--transition-fast, 0.15s ease),
        color var(--transition-fast, 0.15s ease);
}

body.dark-theme .playback-rate-btn {
    background: rgba(15, 23, 42, 0.65);
    border-color: rgba(148, 163, 184, 0.35);
    color: var(--text-color);
}

.playback-rate-btn--chip {
    border-radius: 999px;
    padding: 8px 14px;
    min-height: 34px;
}

.playback-rate-btn:focus-visible {
    outline: 2px solid rgba(59, 130, 246, 0.55);
    outline-offset: 2px;
}

.playback-rate-btn.playback-rate-btn--active {
    background: var(--primary-color);
    color: #fff;
    border-color: transparent;
}

.transcript-search-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 12px 0;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(37, 99, 235, 0.06);
    border: 1px solid rgba(37, 99, 235, 0.14);
}

.transcript-search-input {
    flex: 1 1 200px;
    min-width: 0;
    border-radius: 12px;
    border: 1px solid rgba(37, 99, 235, 0.22);
    padding: 9px 12px;
    font: inherit;
    background: var(--surface-color, #fff);
    color: var(--text-color);
}

.transcript-search-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.transcript-search-count {
    font-size: 0.85rem;
    color: var(--text-secondary);
    min-width: 5.5em;
}

.transcript-search-hit {
    background: rgba(234, 179, 8, 0.55);
    color: #1e293b;
    border-radius: 4px;
    padding: 0 3px;
    cursor: pointer;
    outline-offset: 2px;
}

body.dark-theme .transcript-search-hit {
    color: #f8fafc;
    background: rgba(234, 179, 8, 0.38);
}

.transcript-search-hit--current {
    background: rgba(217, 119, 6, 0.9);
    color: #0f172a;
    box-shadow: 0 0 0 2px rgba(180, 83, 9, 0.45);
}

body.dark-theme .transcript-search-hit--current {
    color: #fffbeb;
    background: rgba(245, 158, 11, 0.55);
}

.transcript-export-actions {
    flex-wrap: wrap;
    justify-content: center;
}

.transcript-segment:not(.transcript-segment--filtered-out) {
    cursor: pointer;
}

.transcript-segment--filtered-out {
    pointer-events: none;
}

.analysis-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 12px 0;
}

.analysis-stat-grid > div {
    border-radius: 14px;
    background: rgba(37, 99, 235, 0.07);
    padding: 10px;
}

.analysis-stat-grid span {
    display: block;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.analysis-stat-grid strong {
    color: var(--text-color);
}

.topic-chip-row,
.entity-chip-grid {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 12px 0;
}

.topic-chip,
.entity-chip {
    border: 1px solid rgba(37, 99, 235, 0.22);
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: var(--text-color);
    padding: 7px 10px;
    font-weight: 650;
}

.topic-chip {
    cursor: pointer;
}

.topic-chip--active {
    background: var(--primary-color);
    color: #fff;
}

.entity-chip small {
    color: var(--text-secondary);
    margin-right: 6px;
}

.transcript-segment-list {
    display: grid;
    gap: 8px;
    margin: 12px 0;
}

.transcript-segment-list--virtual {
    display: block;
    max-height: min(62vh, 560px);
    overflow: auto;
    contain: layout paint;
    border-radius: 16px;
    padding-right: 4px;
}

.transcript-virtual-spacer {
    position: relative;
}

.transcript-virtual-window {
    position: absolute;
    inset: 0 0 auto 0;
    display: grid;
    gap: 8px;
}

.transcript-segment {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: start;
    border-radius: 14px;
    padding: 10px;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.transcript-segment--positive {
    background: rgba(34, 197, 94, 0.1);
}

.transcript-segment--neutral {
    background: rgba(148, 163, 184, 0.12);
}

.transcript-segment--negative {
    background: rgba(239, 68, 68, 0.1);
}

.transcript-segment--filtered-out {
    opacity: 0.25;
}

.transcript-timestamp {
    border: 0;
    border-radius: 999px;
    padding: 5px 8px;
    background: rgba(15, 23, 42, 0.08);
    color: var(--primary-color);
    font-weight: 800;
    cursor: pointer;
}

.transcript-segment-body {
    margin: 0;
}

.transcript-segment p {
    margin: 0;
}

.ai-summary-box {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: start;
    padding: 12px;
    border-radius: 16px;
    background: rgba(37, 99, 235, 0.08);
    margin-top: 12px;
}

.ai-summary-icon {
    font-size: 1.35rem;
}

.insight-bullet-list {
    display: grid;
    gap: 10px;
    padding-left: 0;
    list-style: none;
}

.insight-bullet-list li {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: start;
}

.importance-dot {
    width: 10px;
    height: 10px;
    margin-top: 0.45em;
    border-radius: 50%;
    background: var(--warning-color);
}

.importance-dot--high {
    background: var(--danger-color);
}

.importance-dot--medium {
    background: var(--primary-color);
}

.sentiment-meter {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}

.sentiment-meter__track {
    height: 10px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.24);
    overflow: hidden;
}

.sentiment-meter__track i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--danger-color), var(--warning-color), var(--success-color));
}

.word-cloud-canvas {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.04);
}

.analysis.is-visible .chart-card,
.analysis.is-visible .feedback-section,
.analysis.is-visible .recommendations-section,
.analysis.is-visible .product-insight-section {
    opacity: 0;
    animation: vbResultStagger 0.62s var(--ease-out) both;
}

.analysis.is-visible .chart-card:nth-child(1) { animation-delay: 0.04s; }
.analysis.is-visible .chart-card:nth-child(2) { animation-delay: 0.1s; }
.analysis.is-visible .chart-card:nth-child(3) { animation-delay: 0.16s; }
.analysis.is-visible .feedback-section { animation-delay: 0.1s; }
.analysis.is-visible .recommendations-section { animation-delay: 0.14s; }
.analysis.is-visible .product-insight-section { animation-delay: 0.32s; }

#analysis .feedback-section {
    margin-top: 14px;
    padding: 16px 18px 18px;
}

#analysis .recommendations-section {
    margin-top: 8px;
    padding: 16px 18px 18px;
}

#analysis .feedback-section .ai-accordion,
#analysis .recommendations-section .ai-accordion {
    margin: 4px 0;
}

@media (max-width: 540px) {
    #analysis .feedback-section,
    #analysis .recommendations-section {
        padding: 14px 14px 16px;
    }
}

#analysis .feedback-section .ai-accordion--feedback-summary {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
}

#analysis .feedback-section .feedback-summary,
#analysis .feedback-section .feedback-summary-score {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.report-upload-panel--practice {
    margin-bottom: 12px;
}

.report-upload-panel--practice .file-drop-zone {
    margin-bottom: 0;
}

.practice-report-or-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 8px 0 16px;
    width: 100%;
}

.practice-report-or-divider__line {
    flex: 1;
    min-width: 12px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.55), transparent);
}

.practice-report-or-divider__text {
    flex-shrink: 0;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.dark-theme .practice-report-or-divider__line {
    background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.38), transparent);
}

.dark-theme .practice-report-or-divider__text {
    color: #94a3b8;
}

.recording-upload-or-divider .practice-report-or-divider__text {
    text-transform: none;
    letter-spacing: 0.03em;
    font-weight: 600;
    font-size: 0.85rem;
}

.chart-wrap {
    opacity: 0.35;
    transform: translateY(10px);
    transition: opacity var(--transition-medium), transform var(--transition-medium);
}

.chart-wrap.chart-wrap--drawn {
    opacity: 1;
    transform: translateY(0);
}

.charts-section--lazy .chart-wrap {
    background:
        linear-gradient(90deg, rgba(148, 163, 184, 0.12) 25%, rgba(148, 163, 184, 0.2) 50%, rgba(148, 163, 184, 0.12) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.6s linear infinite;
}

.transcript-segment--active {
    background: rgba(var(--primary-rgb), 0.18) !important;
    box-shadow: inset 0 0 0 1px rgba(var(--primary-rgb), 0.3);
    transform: translateX(2px);
}

@media (max-width: 760px) {
    .analysis-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .transcript-search-input {
        font-size: 16px;
    }
    .transcript-segment {
        grid-template-columns: 1fr;
    }
    .transcript-timestamp {
        justify-self: start;
    }
    .transcript-segment-list {
        width: 100%;
    }
    .sentiment-meter {
        grid-template-columns: 1fr;
    }
    .word-cloud-canvas {
        max-height: 180px;
    }
}

body.dark-theme .analysis-progress {
    background: rgba(15, 23, 42, 0.68);
    border-color: rgba(148, 163, 184, 0.24);
}

body.dark-theme .file-preview-card,
body.dark-theme .file-drop-zone {
    background: rgba(15, 23, 42, 0.68);
    border-color: rgba(148, 163, 184, 0.28);
}

.report-preview-modal {
    max-width: min(900px, 92vw);
}

#reportPreviewFullText {
    max-height: 65vh;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    text-align: left;
    padding: 14px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.06);
}

body.dark-theme #transcriptPanel pre {
    background: rgba(255, 255, 255, 0.06);
}

body.dark-theme .ai-accordion,
body.dark-theme .ai-summary-box,
body.dark-theme .analysis-stat-grid > div,
body.dark-theme .word-cloud-canvas {
    background: rgba(15, 23, 42, 0.68);
}

body.dark-theme .ai-accordion > summary {
    color: var(--dark-text);
}

body.dark-theme .ai-accordion__score {
    color: var(--dark-text);
}

body.dark-theme .ai-score-badge {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.16), rgba(167, 139, 250, 0.12));
    border-color: rgba(148, 163, 184, 0.38);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 2px 14px rgba(0, 0, 0, 0.22);
}

body.dark-theme .ai-score-badge__value {
    color: #93c5fd;
}

body.dark-theme .ai-score-badge__suffix {
    color: var(--dark-text-secondary);
}

body.dark-theme .transcript-duration-chip {
    background: rgba(96, 165, 250, 0.12);
    border-color: rgba(148, 163, 184, 0.32);
    color: #93c5fd;
}

body.dark-theme .ai-accordion > summary::after {
    color: var(--dark-text-secondary);
}

@media (prefers-reduced-motion: reduce) {
    .file-drop-zone--active .file-drop-zone__icon,
    .btn.vb-pulse-success,
    .btn.vb-error-shake,
    .chart-wrap.chart-wrap--drawn,
    .analysis.is-visible .chart-card,
    .analysis.is-visible .feedback-section,
    .analysis.is-visible .recommendations-section,
    .analysis.is-visible .product-insight-section {
        animation: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}

.profile-entitlements-card .profile-section-label,
.profile-payments-card .profile-section-label,
.profile-privacy-card .profile-section-label,
.profile-payments-card .profile-history-head,
.profile-entitlements-card .profile-entitlements-list,
.profile-payments-card .profile-payment-history {
    grid-column: 1 / -1;
}

.profile-entitlements-card {
    padding: 20px !important;
}

.profile-entitlements-list {
    margin-top: 12px !important;
}

.profile-entitlements-list li {
    display: flex;
    align-items: center;
    min-height: 54px;
}

.profile-entitlements-list li::before {
    content: '';
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    margin-right: 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
}

/* ��������� ������������������ ��� FAQ ����� */
@media (max-width: 1100px) {
    .faq-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .faq-item {
        padding: 16px 18px;
        border-radius: 20px;
    }
    
    .faq-item summary {
        padding: 8px 40px 8px 40px;
        font-size: 0.98rem;
    }
    
    .faq-item p {
        padding-left: 40px;
        font-size: 0.9rem;
    }
}


/* �������������� ����������� ��� FAQ */
.faq-grid {
    contain: layout style;
}

.faq-item {
    contain: content;
    will-change: transform;
}

/* �������������� ������� layout ��� ��������/�������� FAQ */
.faq-item[open] {
    margin-bottom: 8px;
}


/* �������������� ��������� ������� FAQ */
.faq-preview {
    position: relative;
    overflow: hidden;
}

.faq-preview::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 30%, rgba(var(--primary-rgb), 0.05), transparent 70%);
    z-index: 0;
    pointer-events: none;
}

.faq-item {
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(var(--primary-rgb), 0.1);
    background: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.95), 
        rgba(247, 250, 255, 0.9)
    );
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
    border-color: rgba(var(--primary-rgb), 0.2);
    background: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.98), 
        rgba(247, 250, 255, 0.95)
    );
}

.faq-item[open] {
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
    border-color: rgba(var(--primary-rgb), 0.25);
    background: linear-gradient(145deg, 
        rgba(255, 255, 255, 1), 
        rgba(247, 250, 255, 0.98)
    );
}

.faq-item summary::before {
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        0 2px 4px rgba(37, 99, 235, 0.1);
}

.faq-item summary::after {
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        0 2px 4px rgba(37, 99, 235, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item[open] summary::after {
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        0 2px 6px rgba(37, 99, 235, 0.2);
}

/* �������� ��������� ������ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.faq-item[open] p {
    animation: fadeInUp 0.4s ease-out;
}

/* ��������� ���������� */
.faq-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        rgba(var(--primary-rgb), 0), 
        rgba(var(--primary-rgb), 0.3), 
        rgba(var(--primary-rgb), 0)
    );
    border-radius: 0 0 24px 24px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.faq-item[open]::after {
    opacity: 1;
}

/* ������ ���� ��� FAQ */
.dark-theme .faq-item {
    background: linear-gradient(145deg, 
        rgba(30, 41, 59, 0.7), 
        rgba(15, 23, 42, 0.6)
    );
    border-color: rgba(96, 165, 250, 0.15);
}

.dark-theme .faq-item:hover {
    background: linear-gradient(145deg, 
        rgba(30, 41, 59, 0.8), 
        rgba(15, 23, 42, 0.7)
    );
    border-color: rgba(96, 165, 250, 0.25);
}

.dark-theme .faq-item[open] {
    background: linear-gradient(145deg, 
        rgba(30, 41, 59, 0.85), 
        rgba(15, 23, 42, 0.75)
    );
    border-color: rgba(96, 165, 250, 0.3);
}

.dark-theme .faq-item summary::before,
.dark-theme .faq-item summary::after {
    background: rgba(96, 165, 250, 0.15);
    color: rgba(96, 165, 250, 0.9);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 2px 4px rgba(0, 0, 0, 0.2);
}

.dark-theme .faq-item[open] summary::after {
    background: rgba(96, 165, 250, 0.25);
}

.dark-theme .faq-preview::before {
    background: radial-gradient(circle at 30% 30%, rgba(96, 165, 250, 0.08), transparent 70%);
}

/* === FAQ Toggle Button === */
.faq-toggle-btn {
    display: block;
    margin: 0 auto 30px;
    padding: 10px 24px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
    font-family: var(--font-primary);
    min-width: 140px;
    position: relative;
    z-index: 10;
}

.faq-toggle-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 14px 36px rgba(37, 99, 235, 0.45);
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
}

.faq-toggle-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.faq-toggle-btn.hidden {
    display: none;
}

/* === FAQ Grid State === */
.faq-grid.collapsed {
    display: none;
}

@media (max-width: 768px) {
    .faq-toggle-btn {
        padding: 8px 20px;
        font-size: 0.88rem;
        min-width: 120px;
        z-index: 20;
    }
}

@media (max-width: 480px) {
    .faq-toggle-btn {
        padding: 6px 16px;
        font-size: 0.82rem;
        min-width: 100px;
    }
}

/* === Targeted mobile/profile/FAQ fixes === */
.profile-promo-form input {
    width: 100%;
    min-width: 0;
}

@media (max-width: 600px) {
    .faq-preview.surface-card .section-head {
        align-items: center !important;
        gap: 10px !important;
        flex-wrap: nowrap;
    }

    .faq-preview.surface-card .section-step-num {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        min-width: 52px !important;
        height: 32px;
        padding: 0 10px !important;
        font-size: 0.82rem !important;
        line-height: 1 !important;
        font-weight: 800 !important;
        border-radius: 10px !important;
        background: linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(79, 70, 229, 0.14)) !important;
        color: var(--primary-color) !important;
        -webkit-text-fill-color: currentColor !important;
    }

    .faq-preview.surface-card .section-title {
        font-size: 0.98rem !important;
        line-height: 1.28 !important;
        font-weight: 800 !important;
    }

    .faq-preview.surface-card .section-desc {
        display: block !important;
        font-size: 0.84rem !important;
        line-height: 1.35 !important;
        -webkit-line-clamp: unset !important;
    }

    .faq-preview .faq-toggle-btn {
        display: block;
        width: 100%;
        margin: 0 0 28px;
        min-height: 42px;
        padding: 10px 14px !important;
        font-size: 0.92rem !important;
        border-radius: 12px !important;
        transform: none !important;
        box-shadow: 0 6px 16px rgba(37, 99, 235, 0.26) !important;
    }

    .faq-preview .faq-grid {
        gap: 10px !important;
    }

    .profile-modal-wide .profile-info p,
    .profile-modal-wide .profile-promo-card,
    .profile-modal-wide .profile-subscription-actions,
    .profile-modal-wide .profile-password-panel,
    .profile-modal-wide .profile-actions-panel,
    .profile-modal-wide .profile-danger-panel {
        border-radius: 14px;
        padding: 12px;
    }

    .profile-promo-form {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .profile-promo-form input {
        width: 100%;
        min-height: 42px;
        font-size: 0.93rem;
        padding: 10px 12px;
    }

    .profile-promo-form input::placeholder {
        font-size: 0.86rem;
        letter-spacing: 0;
    }

    .profile-promo-form button {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 768px) {
    .faq-grid {
        contain: none;
    }

    .faq-item {
        contain: none;
        will-change: auto;
    }

    .faq-item summary {
        scroll-margin-top: 88px;
    }

    .faq-item p {
        margin-top: 10px;
        margin-left: 36px;
        padding-left: 0;
        max-height: none;
        overflow: visible;
        transition: none;
    }

    .faq-item[open] {
        margin-bottom: 0;
    }

    .faq-item[open] p {
        animation: none;
    }
}

/* Lower visual cost in FAQ to reduce mobile jank */
.faq-item {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    will-change: auto;
}

/* FAQ rendering optimizations without visual changes */
.faq-preview {
    contain: layout paint style;
}

.faq-grid {
    content-visibility: auto;
    contain-intrinsic-size: 1px 980px;
}

.faq-item {
    content-visibility: auto;
    contain-intrinsic-size: 1px 140px;
}

@media (hover: none), (pointer: coarse) {
    .faq-item:hover {
        transform: none;
    }
}

/* Visual consistency: unified rounded blocks/panels */
.status,
.timer,
.analysis-source-badge,
.analysis-meta-hint,
.scoring-note,
.structure-score-hint,
.outline-panel,
.report-eval-panel,
.cookie-banner-content,
.verification-box {
    border-radius: var(--border-radius);
}

/* Profile modal hard-fix for mobile overflow */
@media (max-width: 600px) {
    #profileModal {
        padding: 6px !important;
        align-items: flex-end !important;
        justify-content: center !important;
        overflow: hidden !important;
    }

    #profileModal .modal-content.profile-modal-wide {
        box-sizing: border-box !important;
        width: calc(100vw - 12px) !important;
        max-width: calc(100vw - 12px) !important;
        max-height: calc(100dvh - 12px) !important;
        margin: 0 !important;
        padding: 16px 12px calc(16px + env(safe-area-inset-bottom, 0px)) !important;
        border-radius: 20px 20px 0 0 !important;
        clip-path: inset(0 round 20px 20px 0 0) !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        overscroll-behavior: contain !important;
    }

    #profileModal .close {
        top: 8px !important;
        right: 8px !important;
        z-index: 3;
        background: rgba(255, 255, 255, 0.9);
    }

    #profileModal .profile-actions-row {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    #profileModal .profile-actions .btn,
    #profileModal .profile-password-actions .btn {
        flex: 1 1 100% !important;
        width: 100% !important;
        min-width: 0 !important;
    }
}

@media (max-width: 380px) {
    #profileModal .modal-content.profile-modal-wide {
        width: calc(100vw - 8px) !important;
        max-width: calc(100vw - 8px) !important;
        max-height: calc(100dvh - 8px) !important;
        padding: 14px 10px calc(14px + env(safe-area-inset-bottom, 0px)) !important;
    }
}
input, textarea, select { font-size: 16px !important; }

input:focus, textarea:focus, select:focus { font-size: 16px !important; }

#duration, #topic, #uploadText, #prepareScenario {
    font-size: 16px !important;
}