/* ========== ТРЕНИРОВОЧНАЯ КОМНАТА - LUXURY TECH EDITION ========== */

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

:root {
    /* Luxury Dark Palette */
    --void: #05050a;
    --abyss: #0a0a12;
    --obsidian: #0f0f1a;
    --onyx: #151520;
    --graphite: #1a1a28;
    --slate: #252535;

    /* Premium Accent Colors - Blue/Purple Theme */
    --gold: #6366f1;
    --gold-light: #818cf8;
    --platinum: #e5e4e2;
    --silver: #c0c0c0;
    --rose-gold: #ec4899;
    --amethyst: #a855f7;
    --sapphire: #3b82f6;
    --emerald: #22c55e;
    --ruby: #ef4444;

    /* Neon Accents */
    --neon-blue: #00f5ff;
    --neon-purple: #bf00ff;
    --neon-pink: #ff00aa;

    /* Text */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.4);

    /* Glass */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shine: rgba(255, 255, 255, 0.1);

    /* Shadows & Glows - Blue Theme */
    --glow-gold: 0 0 30px rgba(99, 102, 241, 0.4);
    --glow-neon: 0 0 40px rgba(0, 245, 255, 0.3);
    --glow-purple: 0 0 40px rgba(191, 0, 255, 0.3);
    --glow-green: 0 0 30px rgba(34, 197, 94, 0.4);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.8);

    --radius: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--void);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ========== ANIMATED BACKGROUND ========== */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
            radial-gradient(ellipse 80% 50% at 20% -20%, rgba(99, 102, 241, 0.15), transparent),
            radial-gradient(ellipse 60% 40% at 80% 120%, rgba(0, 245, 255, 0.1), transparent),
            radial-gradient(ellipse 40% 60% at 50% 50%, rgba(236, 72, 153, 0.05), transparent);
    pointer-events: none;
    z-index: -2;
}

body::after {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image:
            linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
            linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

/* Floating Particles */
.particles {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px; height: 4px;
    background: var(--gold);
    border-radius: 50%;
    opacity: 0;
    animation: float 15s infinite;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { left: 20%; animation-delay: 2s; }
.particle:nth-child(3) { left: 30%; animation-delay: 4s; }
.particle:nth-child(4) { left: 40%; animation-delay: 6s; }
.particle:nth-child(5) { left: 50%; animation-delay: 8s; }
.particle:nth-child(6) { left: 60%; animation-delay: 10s; }
.particle:nth-child(7) { left: 70%; animation-delay: 12s; }
.particle:nth-child(8) { left: 80%; animation-delay: 14s; }

@keyframes float {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100vh) scale(1); opacity: 0; }
}

/* ========== HEADER ========== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    background: rgba(5, 5, 10, 0.8);
    border-bottom: 1px solid var(--glass-border);
}

.header::before {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold) 20%, var(--rose-gold) 50%, var(--neon-blue) 80%, transparent);
    animation: headerGlow 3s ease-in-out infinite;
}

@keyframes headerGlow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.header-container {
    max-width: 82rem;
    margin: 0 auto;
    padding: 0 2rem;
    height: 5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
}

.logo-icon {
    width: 3rem; height: 3rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gold), var(--rose-gold), var(--neon-blue));
    border-radius: 14px;
    animation: logoRotate 4s linear infinite;
}

.logo-emoji {
    font-size: 1.5rem;
    position: relative;
    z-index: 1;
}

@keyframes logoRotate {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--platinum) 0%, var(--gold) 50%, var(--platinum) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s linear infinite;
}

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

.logo-text span {
    font-weight: 400;
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
    -webkit-background-clip: text;
    background-clip: text;
}

.header-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: linear-gradient(135deg, var(--gold) 0%, var(--rose-gold) 25%, var(--neon-purple) 50%, var(--neon-blue) 75%, var(--emerald) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-title.visible {
    opacity: 1;
    transform: translateY(0);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-subtitle {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

@media (max-width: 768px) {
    .header-subtitle, .header-title { display: none; }
}

.settings-btn {
    width: 2.5rem; height: 2.5rem;
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-btn svg { width: 1.25rem; height: 1.25rem; }

.settings-btn:hover {
    color: var(--gold);
    border-color: var(--gold);
    box-shadow: var(--glow-gold);
}

.user-avatar {
    width: 2.5rem; height: 2.5rem;
    background: linear-gradient(135deg, var(--graphite), var(--slate));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
}

/* ========== MAIN ========== */
.main-container {
    max-width: 82rem;
    margin: 0 auto;
    padding: 2rem;
}

.view { display: none; }
.view.active { display: block; animation: fadeIn 0.4s ease; }

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

/* ========== PAGE TITLE ========== */
.page-title {
    text-align: center;
    padding-bottom: 2rem;
    transition: all 0.4s;
}

.page-title.scrolled {
    opacity: 0;
    transform: scale(0.8) translateY(-20px);
}

.page-title h1 {
    font-size: 2.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: linear-gradient(135deg, var(--gold) 0%, var(--rose-gold) 25%, var(--neon-purple) 50%, var(--neon-blue) 75%, var(--emerald) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========== STATS GRID ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(40px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.4s;
}

.stat-card:hover {
    border-color: var(--gold);
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.stat-card-action {
    background: linear-gradient(135deg, var(--sapphire), var(--neon-purple));
    cursor: pointer;
    border: none;
}

.stat-card-action:hover {
    box-shadow: var(--glow-purple);
}

.stat-icon {
    font-size: 2.5rem;
    background: var(--glass-bg);
    padding: 1rem;
    border-radius: var(--radius-lg);
}

.stat-card-action .stat-icon {
    background: rgba(255,255,255,0.2);
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.stat-card-action .stat-label {
    color: rgba(255,255,255,0.8);
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--gold), var(--platinum));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-hint {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.7);
}

/* ========== SECTION ========== */
.section {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-title::before {
    content: '';
    width: 4px; height: 1.5rem;
    background: linear-gradient(180deg, var(--gold), var(--neon-purple));
    border-radius: 2px;
}

/* ========== SCENARIOS GRID ========== */
.scenarios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.scenario-card {
    background: var(--glass-bg);
    backdrop-filter: blur(40px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: all 0.4s;
    position: relative;
    overflow: hidden;
}

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

.scenario-card:hover {
    border-color: var(--gold);
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

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

.scenario-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.scenario-badges {
    display: flex;
    gap: 0.5rem;
}

.badge {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.375rem 0.75rem;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-easy { background: linear-gradient(135deg, var(--emerald), #00b386); color: white; }
.badge-medium { background: linear-gradient(135deg, var(--gold), var(--rose-gold)); color: var(--void); }
.badge-hard { background: linear-gradient(135deg, var(--ruby), #c0392b); color: white; }

.badge-persona {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
}

.scenario-actions {
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.scenario-card:hover .scenario-actions { opacity: 1; }

.scenario-action-btn {
    width: 2rem; height: 2rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.scenario-action-btn svg { width: 1rem; height: 1rem; }

.scenario-action-btn:hover { color: var(--sapphire); background: rgba(46, 134, 222, 0.1); }
.scenario-action-btn.delete:hover { color: var(--ruby); background: rgba(231, 76, 60, 0.1); }

.scenario-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.scenario-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.scenario-objection {
    margin-bottom: 1.5rem;
}

.scenario-objection-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.25rem;
}

.scenario-objection-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-style: italic;
}

.scenario-start-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--graphite), var(--slate));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s;
    margin-top: auto;
}

.scenario-start-btn svg {
    width: 1rem; height: 1rem;
    transition: transform 0.3s;
}

.scenario-start-btn:hover {
    background: linear-gradient(135deg, var(--gold), var(--rose-gold));
    color: var(--void);
    box-shadow: var(--glow-gold);
}

.scenario-start-btn:hover svg { transform: translateX(4px); }

/* ========== HISTORY TABLE ========== */
.history-table-wrapper {
    background: var(--glass-bg);
    backdrop-filter: blur(40px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
}

.history-table th {
    text-align: left;
    padding: 1rem 1.5rem;
    background: rgba(99, 102, 241, 0.05);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--gold);
}

.history-table td {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--glass-border);
    font-size: 0.875rem;
}

.history-table tr { transition: background 0.3s; }
.history-table tr:hover { background: rgba(255, 255, 255, 0.02); }

.history-score {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.75rem;
}

.history-score.good { background: var(--emerald); color: white; }
.history-score.medium { background: var(--gold); color: var(--void); }
.history-score.bad { background: var(--ruby); color: white; }

.history-link {
    color: var(--sapphire);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.2s;
}

.history-link:hover { color: var(--neon-blue); }
.history-link svg { width: 1rem; height: 1rem; }

/* ========== FORM STYLES ========== */
.form-container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--glass-bg);
    backdrop-filter: blur(40px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 2rem;
}

.form-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.back-btn {
    width: 2.5rem; height: 2.5rem;
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.back-btn svg { width: 1.25rem; height: 1.25rem; }

.back-btn:hover {
    color: var(--gold);
    border-color: var(--gold);
}

.form-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Audio Upload Section */
.audio-upload-section {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(168, 85, 247, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-lg);
    transition: all 0.3s;
}

.audio-upload-section:hover {
    border-color: var(--gold);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}

.audio-upload-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gold);
    border-radius: var(--radius);
    color: white;
}

.audio-upload-icon svg {
    width: 28px;
    height: 28px;
}

.audio-upload-content {
    flex: 1;
}

.audio-upload-content h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.audio-upload-content > p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.audio-upload-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.btn-select-files {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-select-files:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--gold-light);
}

.btn-select-files svg {
    width: 18px;
    height: 18px;
}

.btn-generate-audio {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--gold), var(--amethyst));
    border: none;
    border-radius: var(--radius);
    color: white;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-generate-audio:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-generate-audio:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-generate-audio .btn-loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-generate-audio .spinner {
    width: 18px;
    height: 18px;
    animation: spin 1s linear infinite;
}

.audio-files-list {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
}

@media (max-width: 768px) {
    .audio-upload-section {
        flex-direction: column;
        text-align: center;
    }

    .audio-upload-icon {
        margin: 0 auto;
    }

    .audio-upload-controls {
        justify-content: center;
    }
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

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

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

input[type="text"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.875rem;
    color: var(--text-primary);
    transition: all 0.3s;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

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

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23888'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    padding-right: 3rem;
}

select option {
    background: var(--obsidian);
    color: var(--text-primary);
}

.persona-hint {
    margin-top: 0.75rem;
    padding: 1rem;
    background: rgba(46, 134, 222, 0.1);
    border: 1px solid rgba(46, 134, 222, 0.2);
    border-radius: var(--radius);
    display: flex;
    gap: 0.75rem;
}

.hint-icon { font-size: 1.25rem; }

.hint-text strong {
    display: block;
    font-size: 0.7rem;
    color: var(--sapphire);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.hint-text p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Slider */
input[type="range"] {
    width: 100%;
    height: 8px;
    background: var(--graphite);
    border-radius: 4px;
    appearance: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, var(--gold), var(--rose-gold));
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--glow-gold);
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.difficulty-badge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.form-section {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-section h3 {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* Objections */
.objections-header {
    display: grid;
    grid-template-columns: 1fr 1fr 2.5rem;
    gap: 0.75rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.objection-row {
    display: grid;
    grid-template-columns: 1fr 1fr 2.5rem;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.objection-row textarea {
    min-height: 70px;
}

.remove-objection-btn {
    width: 2.5rem; height: 2.5rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    align-self: start;
    margin-top: 0.5rem;
}

.remove-objection-btn svg { width: 1.25rem; height: 1.25rem; }

.remove-objection-btn:hover {
    color: var(--ruby);
    background: rgba(231, 76, 60, 0.1);
}

.add-objection-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: transparent;
    border: 1px dashed var(--glass-border);
    border-radius: var(--radius);
    color: var(--sapphire);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.add-objection-btn svg { width: 1rem; height: 1rem; }

.add-objection-btn:hover {
    border-color: var(--sapphire);
    background: rgba(46, 134, 222, 0.1);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
}

.btn-primary {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--gold), var(--rose-gold));
    color: var(--void);
    border: none;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary:hover {
    box-shadow: var(--glow-gold);
    transform: translateY(-2px);
}

.btn-secondary {
    padding: 1rem 2rem;
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

/* ========== SESSION VIEW ========== */
#sessionView {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 200;
    background: linear-gradient(135deg, var(--obsidian) 0%, var(--void) 100%);
}

.session-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 2rem;
    position: relative;
}

/* Start Overlay */
.start-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.start-overlay.hidden { display: none; }

.start-call-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: transform 0.3s;
}

.start-call-btn:hover { transform: scale(1.05); }

.call-icon-wrapper {
    width: 6rem; height: 6rem;
    background: linear-gradient(135deg, var(--emerald), #00b386);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--glow-green);
    animation: pulse 2s infinite;
}

.call-icon-wrapper svg {
    width: 3rem; height: 3rem;
    color: white;
}

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

.start-call-text {
    display: block;
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1rem;
}

.start-call-hint {
    display: block;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Loading Overlay */
.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.loading-overlay.hidden { display: none; }

.spinner {
    width: 4rem; height: 4rem;
    border: 4px solid var(--glass-border);
    border-top-color: var(--sapphire);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

.loading-overlay h3 {
    color: white;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.loading-overlay p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Call Info */
.call-info {
    text-align: center;
    padding-top: 2rem;
}

.call-status-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-muted);
}

.call-scenario-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    margin-top: 0.5rem;
}

.call-timer {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* Avatar */
.avatar-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.avatar-rings {
    position: absolute;
}

.ring {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s;
}

.ring-1 {
    width: 12rem; height: 12rem;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 245, 255, 0.1);
}

.ring-2 {
    width: 10rem; height: 10rem;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 245, 255, 0.2);
}

.avatar-rings.speaking .ring { opacity: 1; animation: ringPulse 1.5s infinite; }
.avatar-rings.speaking .ring-2 { animation-delay: 0.3s; }

@keyframes ringPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.2; }
}

.avatar {
    width: 8rem; height: 8rem;
    background: var(--slate);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid white;
    box-shadow: var(--shadow-xl);
    position: relative;
    z-index: 1;
    transition: all 0.3s;
}

.avatar svg {
    width: 4rem; height: 4rem;
    color: var(--text-muted);
    transition: color 0.3s;
}

.avatar.speaking {
    border-color: var(--neon-blue);
}

.avatar.speaking svg {
    color: var(--neon-blue);
}

/* Status Badge Wrapper */
.call-status-wrapper {
    display: flex;
    justify-content: center;
    padding: 2rem 0;
}

.call-status-badge {
    padding: 0.35rem 0.75rem;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 600;
    background: var(--graphite);
    color: var(--text-secondary);
    white-space: nowrap;
}

.call-status-badge.connected {
    background: var(--emerald);
    color: white;
}

.call-status-badge.speaking {
    background: var(--sapphire);
    color: white;
}

.call-status-badge.error {
    background: var(--ruby);
    color: white;
}

/* Controls */
.call-controls {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1rem 0;
}

.control-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
    transition: color 0.3s;
}

.control-btn:hover { color: var(--text-primary); }

.control-icon {
    width: 3.5rem; height: 3.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.control-icon svg { width: 1.5rem; height: 1.5rem; }

.control-btn:hover .control-icon {
    background: rgba(255, 255, 255, 0.2);
}

.control-btn.muted .control-icon {
    background: var(--ruby);
    color: white;
}

.control-btn.end-call .control-icon {
    background: var(--ruby);
    color: white;
    transform: rotate(135deg);
}

.control-btn.end-call:hover .control-icon {
    box-shadow: 0 0 30px rgba(231, 76, 60, 0.5);
    transform: rotate(135deg) scale(1.1);
}

.control-btn.active .control-icon {
    background: white;
    color: var(--sapphire);
}

.call-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    max-width: 400px;
    padding-bottom: 2rem;
}

/* Transcript Drawer */
.transcript-drawer {
    position: absolute;
    top: 1rem; bottom: 6rem; right: 1rem;
    width: 320px;
    max-width: 90vw;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 20;
    animation: slideIn 0.3s ease;
}

.transcript-drawer.hidden { display: none; }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.transcript-header {
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.02);
}

.transcript-header span {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #666;
}

.transcript-header button {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #999;
    padding: 0.25rem;
}

.transcript-header button:hover { color: #333; }
.transcript-header button svg { width: 1rem; height: 1rem; }

.transcript-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.transcript-message {
    display: flex;
    flex-direction: column;
}

.transcript-message.user { align-items: flex-end; }
.transcript-message.model { align-items: flex-start; }

.transcript-message .role {
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 0.25rem;
}

.transcript-message .text {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    max-width: 90%;
    line-height: 1.5;
}

.transcript-message.user .text {
    background: rgba(46, 134, 222, 0.15);
    color: #1a5276;
}

.transcript-message.model .text {
    background: #f1f1f1;
    color: #333;
}

/* ========== REPORT VIEW ========== */
.report-container {
    max-width: 1000px;
    margin: 0 auto;
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(40px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
}

.report-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.report-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.report-header p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.report-score {
    font-size: 2rem;
    font-weight: 800;
}

.report-score.good { color: var(--emerald); }
.report-score.medium { color: var(--gold); }
.report-score.bad { color: var(--ruby); }

.report-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.report-card {
    background: var(--glass-bg);
    backdrop-filter: blur(40px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 2rem;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.scorecard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

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

.scorecard-bars {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.score-row-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.score-bar {
    height: 10px;
    background: var(--graphite);
    border-radius: 5px;
    overflow: hidden;
}

.score-bar-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 1s ease;
}

.score-bar-fill.good { background: linear-gradient(90deg, var(--emerald), #00b386); }
.score-bar-fill.medium { background: linear-gradient(90deg, var(--gold), var(--rose-gold)); }
.score-bar-fill.bad { background: linear-gradient(90deg, var(--ruby), #c0392b); }

.scorecard-feedback {
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.scorecard-feedback h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.feedback-item {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
}

.feedback-icon { font-size: 1.25rem; }

.feedback-positive {
    background: rgba(0, 208, 156, 0.1);
    border: 1px solid rgba(0, 208, 156, 0.2);
}

.feedback-positive p { color: var(--emerald); }

.feedback-negative {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.2);
}

.feedback-negative p { color: var(--ruby); }

.feedback-improvements h4 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.feedback-improvements ul {
    list-style: disc;
    padding-left: 1.25rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.feedback-improvements li { margin-bottom: 0.25rem; }

.report-transcript {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.report-message {
    display: flex;
}

.report-message.user { justify-content: flex-end; }
.report-message.model { justify-content: flex-start; }

.report-message-content {
    max-width: 80%;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-lg);
}

.report-message.user .report-message-content {
    background: rgba(46, 134, 222, 0.15);
    border-radius: var(--radius-lg) var(--radius-lg) 0 var(--radius-lg);
}

.report-message.model .report-message-content {
    background: var(--graphite);
    border-radius: var(--radius-lg) var(--radius-lg) var(--radius-lg) 0;
}

.report-message .role {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.report-message .text {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* ========== SETTINGS VIEW ========== */
.settings-content {
    margin-top: 1rem;
}

.settings-content textarea {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    min-height: 400px;
}

/* ========== UTILITIES ========== */
.hidden { display: none !important; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--abyss); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--gold), var(--rose-gold));
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

::selection { background: var(--gold); color: var(--void); }