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

:root {
    --bg-main: #0b0f19;
    --bg-gradient: radial-gradient(circle at 50% 0%, #1e1b4b 0%, #0b0f19 70%);
    --panel-bg: rgba(17, 24, 39, 0.65);
    --panel-border: rgba(255, 255, 255, 0.08);
    --panel-border-glow: rgba(139, 92, 246, 0.3);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --primary: #8b5cf6;
    --primary-hover: #7c3aed;
    --primary-glow: rgba(139, 92, 246, 0.4);
    --primary-gradient: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    
    --secondary: #06b6d4;
    --secondary-gradient: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    
    --font-heading: 'Outfit', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background-color: var(--bg-main);
    background-image: var(--bg-gradient);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    padding-bottom: 80px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
}
::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.5);
}

/* App Header & Branding */
header {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 24px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: var(--primary-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px var(--primary-glow);
}

.logo-icon i {
    font-size: 20px;
    color: white;
}

.logo-text h1 {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 24px;
    background: linear-gradient(135deg, #ffffff 40%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.logo-text span {
    font-size: 11px;
    font-weight: 600;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    display: block;
    margin-top: -2px;
}

.header-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--panel-border);
    transition: var(--transition-fast);
}

.header-links a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Dashboard Container */
.dashboard {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 450px 1fr;
    gap: 24px;
    margin-top: 20px;
}

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

/* Common Card/Panel Glassmorphism */
.glass-panel {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-md);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: var(--transition-normal);
}

.glass-panel:hover {
    border-color: rgba(139, 92, 246, 0.2);
}

.panel-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
}

.panel-title i {
    color: var(--secondary);
}

/* Input Section: Upload & Recording Control */
.input-section {
    display: flex;
    flex-direction: flex-direction;
    gap: 24px;
}

.input-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Upload Tab / Trigger Design */
.tabs-header {
    display: flex;
    background: rgba(15, 23, 42, 0.6);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid var(--panel-border);
    margin-bottom: 15px;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 10px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-btn.active {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.25);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Drag and Drop Zone */
.dropzone {
    border: 2px dashed rgba(148, 163, 184, 0.3);
    border-radius: var(--radius-md);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    background: rgba(15, 23, 42, 0.2);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.dropzone:hover, .dropzone.dragover {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.05);
    box-shadow: inset 0 0 15px rgba(139, 92, 246, 0.1);
}

.dropzone input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-icon {
    font-size: 40px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 16px;
    transition: var(--transition-normal);
}

.dropzone:hover .upload-icon {
    transform: translateY(-5px);
}

.dropzone-text h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
}

.dropzone-text p {
    font-size: 12px;
    color: var(--text-secondary);
}

/* File Selected Info Block */
.file-info-box {
    margin-top: 15px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.file-info-details {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.file-info-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(6, 182, 212, 0.1);
    color: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.file-info-name {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-info-size {
    font-size: 11px;
    color: var(--text-secondary);
}

.remove-file-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: var(--transition-fast);
}

.remove-file-btn:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

/* Recording Panel */
.recorder-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px 10px;
}

.waveform-canvas-wrapper {
    width: 100%;
    height: 90px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--panel-border);
    overflow: hidden;
    position: relative;
}

.waveform-canvas-wrapper canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.record-btn-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.record-pulse-ring {
    position: absolute;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.2);
    opacity: 0;
    z-index: 1;
}

.recording .record-pulse-ring {
    animation: recordPulse 1.8s infinite cubic-bezier(0.25, 0, 0, 1);
}

@keyframes recordPulse {
    0% {
        transform: scale(0.9);
        opacity: 0.9;
    }
    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

.record-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    border: 3px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
    cursor: pointer;
    z-index: 2;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
    transition: var(--transition-fast);
}

.record-btn:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.4);
}

.recording .record-btn {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: var(--danger);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.record-timer {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    color: white;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.record-timer-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
}

.recording .record-timer-dot {
    background: var(--danger);
    animation: blink 1s infinite alternate;
}

@keyframes blink {
    0% { opacity: 0.3; }
    100% { opacity: 1; }
}

.record-status-text {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Audio Player Section */
.audio-player-container {
    width: 100%;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    padding: 16px;
    margin-top: 10px;
}

.audio-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.player-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.player-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.player-timeline {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.player-progress-container {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    position: relative;
    cursor: pointer;
}

.player-progress-bar {
    height: 100%;
    background: var(--secondary-gradient);
    border-radius: 3px;
    width: 0%;
    position: relative;
}

.player-progress-handle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: white;
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    transition: transform var(--transition-fast);
}

.player-progress-container:hover .player-progress-handle {
    transform: translateY(-50%) scale(1);
}

.player-time-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-secondary);
}

/* Transcribe Config Panel Styles */
.config-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.config-group:last-child {
    margin-bottom: 0;
}

.config-label {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.config-label i {
    color: var(--primary);
}

/* Custom Dropdown select */
.custom-select-wrapper {
    position: relative;
}

.custom-select {
    width: 100%;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    padding: 12px;
    color: white;
    font-family: var(--font-body);
    font-size: 14px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: var(--transition-fast);
    outline: none;
}

.custom-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.2);
}

.custom-select-wrapper::after {
    content: '\f107';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
    font-size: 14px;
}

/* Mode Switches (Translate / Transcribe) */
.switch-container {
    display: flex;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    padding: 4px;
}

.switch-option {
    flex: 1;
    text-align: center;
    padding: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 6px;
    transition: var(--transition-fast);
}

.switch-option.active {
    background: rgba(139, 92, 246, 0.15);
    color: white;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

/* Custom checkbox block styling */
.checkbox-block {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--panel-border);
    padding: 12px;
    border-radius: 8px;
    transition: var(--transition-fast);
}

.checkbox-block:hover {
    background: rgba(255, 255, 255, 0.05);
}

.checkbox-block input {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 1.5px solid var(--text-secondary);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.checkbox-custom i {
    font-size: 11px;
    color: white;
    opacity: 0;
    transform: scale(0.6);
    transition: var(--transition-fast);
}

.checkbox-block input:checked + .checkbox-custom {
    background: var(--primary-gradient);
    border-color: transparent;
}

.checkbox-block input:checked + .checkbox-custom i {
    opacity: 1;
    transform: scale(1);
}

.checkbox-label-wrapper {
    display: flex;
    flex-direction: column;
}

.checkbox-label-title {
    font-size: 13px;
    font-weight: 600;
    color: white;
}

.checkbox-label-desc {
    font-size: 11px;
    color: var(--text-secondary);
}

/* Process Button styling */
.action-btn {
    width: 100%;
    background: var(--primary-gradient);
    border: none;
    border-radius: 12px;
    padding: 16px;
    color: white;
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 4px 20px var(--primary-glow);
    transition: var(--transition-normal);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(139, 92, 246, 0.6);
}

.action-btn:active {
    transform: translateY(1px);
}

.action-btn:disabled {
    background: var(--panel-border);
    color: var(--text-muted);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Right Side - Output View styling */
.output-section {
    display: flex;
    flex-direction: column;
    min-height: 500px;
    height: calc(100vh - 160px);
}

@media (max-width: 1100px) {
    .output-section {
        height: auto;
        min-height: 500px;
    }
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--panel-border);
    padding-bottom: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.output-title-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.output-title-wrapper h2 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.output-title-wrapper .status-badge {
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-secondary);
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
}

.output-title-wrapper .status-badge.working {
    background: rgba(139, 92, 246, 0.15);
    color: var(--primary);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.output-title-wrapper .status-badge.completed {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.output-title-wrapper .status-badge.error {
    background: rgba(239, 110, 110, 0.15);
    color: var(--danger);
    border: 1px solid rgba(239, 110, 110, 0.2);
}

.output-actions {
    display: flex;
    gap: 8px;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--panel-border);
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-fast);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border-color: rgba(255, 255, 255, 0.15);
}

.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Format View Toggles (Output Sub-tabs) */
.view-toggles {
    display: flex;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    padding: 3px;
    margin-bottom: 20px;
    overflow-x: auto;
}

.view-toggle-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 8px 12px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.view-toggle-btn.active {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

/* Main Display Panels */
.display-container {
    flex: 1;
    overflow-y: auto;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-md);
    padding: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
}

.display-view {
    display: none;
    height: 100%;
}

.display-view.active {
    display: block;
}

/* Empty State Styling */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-secondary);
    height: 100%;
    min-height: 250px;
    flex: 1;
    padding: 40px;
}

.empty-state-icon {
    font-size: 48px;
    color: var(--text-muted);
    margin-bottom: 16px;
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.empty-state h3 {
    color: white;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 13px;
    max-width: 300px;
}

/* Loader / Processing State */
.loader-state {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 300px;
    flex: 1;
}

.loader-waves {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 60px;
    margin-bottom: 24px;
}

.loader-wave {
    width: 6px;
    height: 15px;
    background: var(--primary-gradient);
    border-radius: 3px;
    animation: waveStretch 1.2s ease-in-out infinite;
}

.loader-wave:nth-child(1) { animation-delay: 0.1s; }
.loader-wave:nth-child(2) { animation-delay: 0.2s; }
.loader-wave:nth-child(3) { animation-delay: 0.3s; }
.loader-wave:nth-child(4) { animation-delay: 0.4s; }
.loader-wave:nth-child(5) { animation-delay: 0.5s; }
.loader-wave:nth-child(6) { animation-delay: 0.6s; }
.loader-wave:nth-child(7) { animation-delay: 0.7s; }
.loader-wave:nth-child(8) { animation-delay: 0.8s; }

@keyframes waveStretch {
    0%, 100% {
        height: 15px;
        transform: scaleY(1);
    }
    50% {
        height: 60px;
        transform: scaleY(1);
    }
}

.loader-state h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    color: white;
    margin-bottom: 8px;
}

.loader-state p {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Transcribed View Panels */
/* Text View Panel */
.text-view {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-primary);
    white-space: pre-wrap;
    outline: none;
}

/* SRT Subtitle View */
.srt-view {
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    color: var(--secondary);
    background: rgba(0, 0, 0, 0.3);
    padding: 16px;
    border-radius: 8px;
    border: 1px solid var(--panel-border);
    white-space: pre;
    overflow: auto;
    height: 100%;
}

/* Interactive Timestamps Word Cloud */
.timestamp-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-content: flex-start;
}

.timestamp-word {
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.timestamp-word:hover {
    background: rgba(139, 92, 246, 0.15);
    border-color: var(--primary);
    color: white;
    transform: translateY(-1px);
}

.timestamp-word.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 10px rgba(139, 92, 246, 0.3);
}

.timestamp-tag {
    font-size: 10px;
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
    padding-right: 4px;
}

.timestamp-word:hover .timestamp-tag {
    color: var(--secondary);
}

/* Speaker Diarized Chat Timeline */
.diarized-timeline {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.diarized-segment {
    display: flex;
    gap: 12px;
    animation: fadeInUp 0.4s ease-out;
}

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

.speaker-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--secondary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(6, 182, 212, 0.2);
}

/* Assign different color styles to different speakers dynamically */
.speaker-avatar.speaker-0 { background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%); }
.speaker-avatar.speaker-1 { background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%); }
.speaker-avatar.speaker-2 { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.speaker-avatar.speaker-3 { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }

.segment-bubble {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--panel-border);
    border-radius: 0 16px 16px 16px;
    padding: 12px 16px;
    flex: 1;
}

.segment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.segment-speaker-name {
    font-size: 13px;
    font-weight: 600;
    color: white;
}

.segment-time {
    font-size: 11px;
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
    cursor: pointer;
}

.segment-time:hover {
    color: var(--secondary);
    text-decoration: underline;
}

.segment-text {
    font-size: 14px;
    line-height: 1.6;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--panel-border);
    backdrop-filter: blur(8px);
    border-left: 4px solid var(--primary);
    padding: 16px 20px;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    min-width: 300px;
    max-width: 450px;
    animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.info { border-left-color: var(--secondary); }

.toast-icon {
    font-size: 16px;
}
.toast.success .toast-icon { color: var(--success); }
.toast.error .toast-icon { color: var(--danger); }
.toast.info .toast-icon { color: var(--secondary); }

.toast-message {
    flex: 1;
}

.toast-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 12px;
}

.toast-close:hover {
    color: white;
}
