/* ==================== VOICE CLONING STUDIO - AUDIO STUDIO AESTHETIC ==================== */
/* Design: Professional recording studio meets cyberpunk - deep darks, neon teal/cyan accents, 
   waveform decorations, and dynamic glow effects */

/* ==================== CSS Variables ==================== */
:root {
    /* Core Palette - Deep Studio Blacks with Neon Accents */
    --void: #05080d;
    --abyss: #0a0f18;
    --studio: #0f1521;
    --console: #141c2a;
    --panel: #1a2436;
    --surface: #243044;

    /* Neon Accent Colors */
    --neon-cyan: #00f0ff;
    --neon-cyan-dim: #00c4d4;
    --neon-magenta: #ff00aa;
    --neon-purple: #8b5cf6;
    --neon-green: #00ff88;

    /* Glow Effects */
    --glow-cyan: 0 0 20px rgba(0, 240, 255, 0.4), 0 0 40px rgba(0, 240, 255, 0.2);
    --glow-magenta: 0 0 20px rgba(255, 0, 170, 0.4), 0 0 40px rgba(255, 0, 170, 0.2);
    --glow-soft: 0 0 30px rgba(0, 240, 255, 0.15);

    /* Text Colors */
    --text-bright: #ffffff;
    --text-primary: #e4e8f0;
    --text-secondary: #8892a8;
    --text-muted: #4a5568;

    /* Gradients */
    --gradient-cyan: linear-gradient(135deg, #00f0ff 0%, #00c4d4 50%, #0891b2 100%);
    --gradient-mesh: radial-gradient(ellipse at 20% 0%, rgba(0, 240, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(255, 0, 170, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(139, 92, 246, 0.04) 0%, transparent 60%);

    /* Borders & Surface */
    --border-subtle: rgba(0, 240, 255, 0.1);
    --border-hover: rgba(0, 240, 255, 0.3);
    --border-active: rgba(0, 240, 255, 0.6);

    /* Typography */
    --font-display: 'Outfit', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Spacing & Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--void);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Animated Background Mesh */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: var(--gradient-mesh);
    pointer-events: none;
    z-index: -2;
}

/* Animated Grid Pattern */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 240, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: -1;
    animation: gridPulse 8s ease-in-out infinite;
}

@keyframes gridPulse {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.6;
    }
}

/* ==================== Layout ==================== */
.app-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 2rem 2.5rem;
    min-height: 100vh;
}

/* ==================== Header ==================== */
.header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.logo-icon {
    font-size: 3rem;
    filter: drop-shadow(0 0 20px rgba(0, 240, 255, 0.5));
    animation: iconGlow 3s ease-in-out infinite alternate;
}

@keyframes iconGlow {
    0% {
        filter: drop-shadow(0 0 15px rgba(0, 240, 255, 0.4));
        transform: translateY(0);
    }

    100% {
        filter: drop-shadow(0 0 25px rgba(0, 240, 255, 0.7));
        transform: translateY(-4px);
    }
}

.logo h1 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: var(--gradient-cyan);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 60px rgba(0, 240, 255, 0.3);
}

.subtitle {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

/* Waveform Decoration */
.header::after {
    content: '';
    position: absolute;
    bottom: -1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 3px;
    background: var(--gradient-cyan);
    border-radius: 2px;
    box-shadow: var(--glow-cyan);
}

/* ==================== Main Grid ==================== */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

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

/* ==================== Panels ==================== */
.panel {
    background: linear-gradient(180deg, var(--console) 0%, var(--studio) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
    opacity: 0.5;
}

.panel:hover {
    border-color: var(--border-hover);
    box-shadow: var(--glow-soft), 0 20px 50px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

.panel-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-bright);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
    letter-spacing: 0.01em;
}

.panel-title .icon {
    font-size: 1.4rem;
    filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.5));
}

.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-subtle), transparent);
    margin: 2.5rem 0;
}

/* ==================== Upload Zone - Audio Waveform Style ==================== */
.upload-zone {
    border: 2px dashed var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    position: relative;
    background:
        linear-gradient(135deg, rgba(0, 240, 255, 0.02) 0%, transparent 50%),
        var(--abyss);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

/* Animated waveform background */
.upload-zone::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background:
        repeating-linear-gradient(90deg,
            transparent 0px, transparent 4px,
            rgba(0, 240, 255, 0.1) 4px, rgba(0, 240, 255, 0.1) 6px);
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 20 Q 10 5, 20 20 T 40 20 T 60 20 T 80 20 T 100 20 T 120 20 T 140 20 T 160 20 T 180 20 T 200 20' fill='none' stroke='white' stroke-width='40'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 20 Q 10 5, 20 20 T 40 20 T 60 20 T 80 20 T 100 20 T 120 20 T 140 20 T 160 20 T 180 20 T 200 20' fill='none' stroke='white' stroke-width='40'/%3E%3C/svg%3E");
    opacity: 0.5;
    animation: waveScroll 3s linear infinite;
}

@keyframes waveScroll {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 60px 0;
    }
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--neon-cyan);
    background:
        linear-gradient(135deg, rgba(0, 240, 255, 0.05) 0%, transparent 50%),
        var(--abyss);
    box-shadow: inset 0 0 40px rgba(0, 240, 255, 0.05), var(--glow-soft);
    transform: scale(1.01);
}

.upload-zone.dragover {
    animation: dragPulse 0.8s ease infinite;
}

@keyframes dragPulse {

    0%,
    100% {
        box-shadow: inset 0 0 40px rgba(0, 240, 255, 0.05), 0 0 20px rgba(0, 240, 255, 0.2);
    }

    50% {
        box-shadow: inset 0 0 60px rgba(0, 240, 255, 0.1), 0 0 40px rgba(0, 240, 255, 0.4);
    }
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 1.25rem;
    filter: drop-shadow(0 0 15px rgba(0, 240, 255, 0.4));
    animation: uploadBounce 2.5s ease-in-out infinite;
}

@keyframes uploadBounce {

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

    50% {
        transform: translateY(-8px) scale(1.05);
    }
}

.upload-text {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-bright);
    margin-bottom: 0.5rem;
}

.upload-hint {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.upload-formats {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--neon-cyan);
    background: rgba(0, 240, 255, 0.08);
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-sm);
    display: inline-block;
    border: 1px solid rgba(0, 240, 255, 0.15);
}

/* ==================== Form Elements ==================== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.6rem;
    letter-spacing: 0.02em;
}

.form-group input[type="text"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 1rem 1.25rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-primary);
    background: var(--abyss);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    outline: none;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.1), var(--glow-soft);
    background: var(--studio);
}

.form-group input[type="text"]::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.form-group 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='%2300f0ff' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.25rem center;
    padding-right: 3rem;
}

.input-hint {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    letter-spacing: 0.02em;
}

.char-count {
    text-align: right;
}

.char-count span {
    color: var(--neon-cyan);
}

/* ==================== File Preview ==================== */
.file-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--abyss);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.file-icon {
    font-size: 1.75rem;
    filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.4));
}

.file-name {
    flex: 1;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#audioPreview {
    width: 100%;
    height: 48px;
    border-radius: var(--radius-sm);
    filter: hue-rotate(160deg) saturate(1.5);
}

/* ==================== Buttons ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 1rem 1.75rem;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    width: 100%;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.02em;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.btn:hover::before {
    transform: translateX(100%);
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

.btn-primary {
    background: var(--gradient-cyan);
    color: var(--void);
    box-shadow: 0 4px 20px rgba(0, 240, 255, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: var(--glow-cyan), 0 8px 30px rgba(0, 240, 255, 0.4);
}

.btn-secondary {
    background: var(--panel);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--surface);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: var(--glow-soft);
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}

.btn-outline:hover:not(:disabled) {
    background: rgba(0, 240, 255, 0.05);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}

.btn-small {
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.4rem;
    font-size: 1.1rem;
    transition: all 0.25s ease;
    border-radius: 50%;
    width: auto;
}

.btn-icon:hover {
    color: var(--neon-cyan);
    background: rgba(0, 240, 255, 0.1);
    transform: scale(1.1);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.4), 0 6px 20px rgba(239, 68, 68, 0.3);
}

/* ==================== Audio Player ==================== */
.audio-player {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: var(--abyss);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.audio-player audio {
    width: 100%;
    height: 48px;
    filter: hue-rotate(160deg) saturate(1.5);
}

/* ==================== Voices List ==================== */
.voices-panel {
    max-height: calc(100vh - 180px);
    display: flex;
    flex-direction: column;
}

.voices-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.75rem;
    margin-right: -0.5rem;
}

.voices-list::-webkit-scrollbar {
    width: 4px;
}

.voices-list::-webkit-scrollbar-track {
    background: var(--abyss);
    border-radius: 2px;
}

.voices-list::-webkit-scrollbar-thumb {
    background: var(--neon-cyan);
    border-radius: 2px;
    box-shadow: 0 0 10px var(--neon-cyan);
}

.voice-card {
    background: linear-gradient(135deg, var(--panel) 0%, var(--console) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 0.875rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.voice-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--neon-cyan);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.voice-card:hover {
    border-color: var(--border-hover);
    transform: translateX(6px);
    box-shadow: -6px 0 30px rgba(0, 240, 255, 0.1);
}

.voice-card:hover::before {
    opacity: 1;
    box-shadow: 0 0 15px var(--neon-cyan);
}

.voice-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.voice-name {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-bright);
    word-break: break-all;
    flex: 1;
    line-height: 1.4;
}

.voice-meta {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.voice-actions {
    display: flex;
    gap: 0.625rem;
    margin-top: 1rem;
}

.voice-actions .btn {
    flex: 1;
    padding: 0.6rem;
    font-size: 0.75rem;
}

/* ==================== Empty & Loading States ==================== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1.25rem;
    display: block;
    filter: grayscale(0.5);
    opacity: 0.6;
}

.empty-state p {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.empty-hint {
    font-size: 0.9rem !important;
    color: var(--text-muted) !important;
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem;
    color: var(--text-secondary);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--panel);
    border-top-color: var(--neon-cyan);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}

.spinner.large {
    width: 56px;
    height: 56px;
    border-width: 4px;
}

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

/* ==================== AI Processing Overlay ==================== */
.ai-processing-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 8, 13, 0.95);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.ai-processing-overlay.show {
    opacity: 1;
    visibility: visible;
}

.ai-processing-content {
    text-align: center;
    max-width: 400px;
    padding: 2rem;
}

/* Waveform Animation */
.ai-waveform {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    height: 60px;
    margin-bottom: 2rem;
}

.wave-bar {
    width: 6px;
    background: var(--gradient-cyan);
    border-radius: 3px;
    animation: waveAnimation 1.2s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

.wave-bar:nth-child(1) {
    animation-delay: 0s;
    height: 20px;
}

.wave-bar:nth-child(2) {
    animation-delay: 0.1s;
    height: 35px;
}

.wave-bar:nth-child(3) {
    animation-delay: 0.2s;
    height: 50px;
}

.wave-bar:nth-child(4) {
    animation-delay: 0.3s;
    height: 60px;
}

.wave-bar:nth-child(5) {
    animation-delay: 0.4s;
    height: 50px;
}

.wave-bar:nth-child(6) {
    animation-delay: 0.5s;
    height: 35px;
}

.wave-bar:nth-child(7) {
    animation-delay: 0.6s;
    height: 20px;
}

.wave-bar:nth-child(8) {
    animation-delay: 0.7s;
    height: 10px;
}

@keyframes waveAnimation {

    0%,
    100% {
        transform: scaleY(0.3);
        opacity: 0.5;
    }

    50% {
        transform: scaleY(1);
        opacity: 1;
    }
}

/* AI Icon with Pulse */
.ai-icon-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.ai-icon {
    font-size: 4rem;
    position: relative;
    z-index: 1;
    animation: iconFloat 2s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(0, 240, 255, 0.5));
}

@keyframes iconFloat {

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

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

.ai-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulseRing 2s ease-out infinite;
}

@keyframes pulseRing {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

/* AI Stage Text */
.ai-stage {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-bright);
    margin-bottom: 2rem;
    min-height: 2em;
    animation: textGlow 2s ease-in-out infinite;
}

@keyframes textGlow {

    0%,
    100% {
        text-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
    }

    50% {
        text-shadow: 0 0 20px rgba(0, 240, 255, 0.6), 0 0 40px rgba(0, 240, 255, 0.3);
    }
}

/* Progress Bar */
.ai-progress-container {
    margin-bottom: 1.5rem;
}

.ai-progress-bar {
    height: 8px;
    background: var(--panel);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-subtle);
}

.ai-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--gradient-cyan);
    border-radius: 4px;
    transition: width 0.3s ease-out;
    position: relative;
}

.ai-progress-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 20px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4));
    animation: shimmer 1s ease-in-out infinite;
}

@keyframes shimmer {
    0% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

.ai-progress-glow {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(0, 240, 255, 0.2) 50%, transparent 100%);
    animation: progressGlow 2s ease-in-out infinite;
}

@keyframes progressGlow {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.ai-progress-text {
    display: flex;
    justify-content: space-between;
    margin-top: 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

#aiProgressPercent {
    color: var(--neon-cyan);
    font-weight: 600;
}

#aiEstimatedTime {
    color: var(--text-muted);
}

/* Tech Tip */
.ai-tech-tip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.1);
    border-radius: var(--radius-md);
    animation: tipFade 4s ease-in-out infinite;
}

@keyframes tipFade {

    0%,
    100% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
    }
}

.tip-icon {
    font-size: 1rem;
}

.tip-text {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

/* ==================== Toast Notifications ==================== */
.toast {
    position: fixed;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(120px);
    background: var(--console);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1rem 1.75rem;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), var(--glow-soft);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
    max-width: 90%;
    backdrop-filter: blur(10px);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}

.toast.success {
    border-color: var(--neon-green);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 255, 136, 0.2);
}

.toast.error {
    border-color: #ef4444;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(239, 68, 68, 0.2);
}

.toast.warning {
    border-color: #f59e0b;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(245, 158, 11, 0.2);
}

.toast-icon {
    font-size: 1.4rem;
}

.toast-message {
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* ==================== Loading Overlay ==================== */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 8, 13, 0.92);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.loading-content {
    text-align: center;
    color: var(--text-primary);
}

.loading-content p {
    margin-top: 1.5rem;
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--neon-cyan);
    text-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
}

/* ==================== Refresh Button ==================== */
.refresh-btn {
    margin-left: auto;
    font-size: 1.2rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.refresh-btn:hover {
    transform: rotate(180deg) scale(1.1);
    color: var(--neon-cyan);
}

.refresh-btn.spinning {
    animation: spin 0.7s linear infinite;
    color: var(--neon-cyan);
}

/* ==================== Responsive ==================== */
@media (max-width: 768px) {
    .app-container {
        padding: 1.25rem;
    }

    .logo h1 {
        font-size: 1.75rem;
    }

    .logo-icon {
        font-size: 2.25rem;
    }

    .panel {
        padding: 1.5rem;
    }

    .upload-zone {
        padding: 2rem 1.5rem;
    }

    .upload-icon {
        font-size: 3rem;
    }
}

/* ==================== Selection ==================== */
::selection {
    background: var(--neon-cyan);
    color: var(--void);
}

/* ==================== Focus Visible ==================== */
:focus-visible {
    outline: 2px solid var(--neon-cyan);
    outline-offset: 2px;
}

/* ==================== Synthesis Stats ==================== */
.synthesis-stats {
    margin-top: 1.25rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--panel) 0%, var(--console) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    display: none;
}

.stats-header {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--neon-cyan);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-subtle);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

@media (max-width: 600px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stat-item {
    text-align: center;
    padding: 0.75rem;
    background: var(--abyss);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    transition: all 0.3s ease;
}

.stat-item:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--glow-soft);
}

.stat-value {
    display: block;
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--neon-cyan);
    margin-bottom: 0.25rem;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.stat-label {
    display: block;
    font-family: var(--font-body);
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}