/**
 * Toolsvibe Voice AI Studio - ElevenLabs Ultra Edition Stylesheet
 * Dark theme with ambient neon glow, sleek studio controls, and interactive waveform
 */

:root {
    --vs-bg-dark: #07090e;
    --vs-bg-card: rgba(15, 19, 32, 0.85);
    --vs-bg-card-hover: rgba(22, 28, 48, 0.95);
    --vs-border: rgba(139, 92, 246, 0.2);
    --vs-border-active: rgba(139, 92, 246, 0.6);
    --vs-primary: #8b5cf6;
    --vs-primary-glow: rgba(139, 92, 246, 0.4);
    --vs-accent: #06b6d4;
    --vs-accent-glow: rgba(6, 182, 212, 0.4);
    --vs-text-main: #f8fafc;
    --vs-text-muted: #94a3b8;
    --vs-gradient: linear-gradient(135deg, #8b5cf6 0%, #6366f1 50%, #06b6d4 100%);
}

body.voice-studio-body {
    background-color: var(--vs-bg-dark);
    color: var(--vs-text-main);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Ambient Background Glow */
.vs-ambient-mesh {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.vs-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.22;
}
.vs-orb-1 { width: 500px; height: 500px; top: -100px; left: -100px; background: #8b5cf6; }
.vs-orb-2 { width: 450px; height: 450px; top: 30%; right: -100px; background: #06b6d4; }
.vs-orb-3 { width: 400px; height: 400px; bottom: -50px; left: 30%; background: #6366f1; }

/* Top Navigation Bar */
.vs-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(7, 9, 14, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 14px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.vs-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #fff;
}
.vs-logo-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--vs-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    box-shadow: 0 0 20px var(--vs-primary-glow);
}
.vs-brand-title {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.4px;
    background: linear-gradient(135deg, #fff 40%, #c4b5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.vs-badge-unlimited {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: #c4b5fd;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 9999px;
}
.vs-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #06b6d4;
    box-shadow: 0 0 10px #06b6d4;
    animation: vsPulse 1.8s infinite;
}
@keyframes vsPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.6; }
}

/* Studio Main Layout Container */
.vs-container {
    max-width: 1360px;
    margin: 0 auto;
    padding: 30px 20px 80px 20px;
    position: relative;
    z-index: 1;
}

/* Hero Title Section */
.vs-hero-header {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 36px auto;
}
.vs-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: #67e8f9;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 9999px;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}
.vs-hero-title {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.8px;
    margin-bottom: 14px;
}
.vs-hero-title span {
    background: var(--vs-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.vs-hero-subtitle {
    font-size: 16px;
    color: var(--vs-text-muted);
    line-height: 1.6;
    margin-bottom: 0;
}

/* Studio Grid Layout */
.vs-studio-grid {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 24px;
    align-items: start;
}
@media (max-width: 992px) {
    .vs-studio-grid { grid-template-columns: 1fr; }
}

/* Left Panel: Voice Selector & Settings */
.vs-panel-card {
    background: var(--vs-bg-card);
    border: 1px solid var(--vs-border);
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.vs-panel-title {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.vs-filter-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.vs-chip {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--vs-text-muted);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.vs-chip:hover, .vs-chip.active {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.5);
    color: #fff;
}

/* Voice Cards List */
.vs-voice-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 4px;
}
.vs-voice-list::-webkit-scrollbar { width: 5px; }
.vs-voice-list::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 4px; }

.vs-voice-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.vs-voice-item:hover {
    background: var(--vs-bg-card-hover);
    border-color: rgba(139, 92, 246, 0.3);
    transform: translateY(-1px);
}
.vs-voice-item.active {
    background: rgba(139, 92, 246, 0.15);
    border-color: var(--vs-border-active);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
}
.vs-voice-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.4), rgba(6, 182, 212, 0.4));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    color: #fff;
    flex-shrink: 0;
}
.vs-voice-meta {
    flex: 1;
    margin-left: 10px;
}
.vs-voice-name {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
}
.vs-voice-desc {
    font-size: 11px;
    color: var(--vs-text-muted);
}
.vs-voice-preview-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #c4b5fd;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 10px;
    transition: all 0.2s ease;
}
.vs-voice-preview-btn:hover {
    background: var(--vs-primary);
    color: #fff;
    transform: scale(1.1);
}

/* Voice Sliders & Tuning Controls */
.vs-sliders-wrap {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.vs-slider-group {
    margin-bottom: 14px;
}
.vs-slider-header {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 6px;
}
.vs-slider-val {
    color: var(--vs-accent);
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
}
.vs-range-slider {
    width: 100%;
    height: 5px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    accent-color: var(--vs-primary);
    cursor: pointer;
}

/* Main Studio Workspace: Text Editor & Generation */
.vs-workspace {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.vs-editor-card {
    background: var(--vs-bg-card);
    border: 1px solid var(--vs-border);
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.vs-editor-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.vs-editor-meta {
    font-size: 13px;
    font-weight: 600;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 8px;
}
.vs-templates-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.vs-template-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    font-size: 11px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.vs-template-btn:hover {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.4);
    color: #fff;
}

.vs-textarea {
    width: 100%;
    min-height: 190px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 16px;
    color: #fff;
    font-size: 15px;
    line-height: 1.6;
    font-family: inherit;
    resize: vertical;
    outline: none;
    box-sizing: border-box;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}
.vs-textarea:focus {
    border-color: var(--vs-primary);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.25);
}

.vs-editor-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    flex-wrap: wrap;
    gap: 12px;
}
.vs-char-count {
    font-size: 12px;
    color: var(--vs-text-muted);
}
.vs-char-count strong {
    color: #fff;
}

/* Primary Generate Button */
.vs-btn-generate {
    background: var(--vs-gradient);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    border: none;
    border-radius: 9999px;
    padding: 13px 32px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 0 25px var(--vs-primary-glow);
    transition: all 0.25s ease;
}
.vs-btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 35px rgba(139, 92, 246, 0.6);
}
.vs-btn-generate:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Audio Player Section (ElevenLabs Experience) */
.vs-player-card {
    background: linear-gradient(135deg, rgba(20, 24, 42, 0.95), rgba(15, 18, 30, 0.95));
    border: 1px solid rgba(139, 92, 246, 0.35);
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(139, 92, 246, 0.15);
    display: none; /* Shown once audio is generated */
    animation: vsFadeUp 0.35s ease;
}
@keyframes vsFadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.vs-player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}
.vs-player-voice-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #c4b5fd;
    background: rgba(139, 92, 246, 0.15);
    padding: 4px 12px;
    border-radius: 999px;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

/* Waveform Visualizer Canvas */
.vs-waveform-wrap {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 16px;
    cursor: pointer;
    position: relative;
}
.vs-waveform-canvas {
    width: 100%;
    height: 64px;
    display: block;
}

/* Player Controls Row */
.vs-controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
}
.vs-controls-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.vs-play-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--vs-gradient);
    border: none;
    color: #fff;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 15px var(--vs-primary-glow);
    transition: transform 0.2s ease;
}
.vs-play-btn:hover {
    transform: scale(1.08);
}
.vs-time-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: #cbd5e1;
    font-weight: 600;
}
.vs-speed-chips {
    display: flex;
    gap: 4px;
}
.vs-speed-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--vs-text-muted);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
}
.vs-speed-btn.active {
    background: var(--vs-primary);
    color: #fff;
    border-color: var(--vs-primary);
}

/* Download Action Buttons */
.vs-controls-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.vs-btn-download-mp3 {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    padding: 9px 18px;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.35);
    transition: all 0.2s ease;
}
.vs-btn-download-mp3:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.5);
}
.vs-btn-action-ghost {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}
.vs-btn-action-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* History Section */
.vs-history-card {
    background: var(--vs-bg-card);
    border: 1px solid var(--vs-border);
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.vs-history-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    margin-top: 12px;
}
.vs-history-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.2s ease;
}
.vs-history-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(139, 92, 246, 0.3);
}
.vs-history-item-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--vs-text-muted);
}
.vs-history-snippet {
    font-size: 13px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}
.vs-history-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Comparison Section: Toolsvibe vs ElevenLabs */
.vs-comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.vs-comparison-table th, .vs-comparison-table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 14px;
}
.vs-comparison-table th {
    background: rgba(15, 19, 32, 0.95);
    color: #fff;
    font-weight: 700;
}
.vs-comparison-table td {
    background: rgba(10, 13, 22, 0.6);
    color: #cbd5e1;
}

/* Toast Container */
.vs-toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}
.vs-toast {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    color: #fff;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: vsToastIn 0.3s ease forwards;
    pointer-events: auto;
}
.vs-toast.success { border-color: rgba(16, 185, 129, 0.5); }
.vs-toast.error { border-color: rgba(239, 68, 68, 0.5); }
.vs-toast.info { border-color: rgba(6, 182, 212, 0.5); }
@keyframes vsToastIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
