/* ============================================
   GenStudio AI — Design System & Styles
   ============================================ */

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

:root {
    --bg-primary: #07060d;
    --bg-secondary: #0d0b18;
    --bg-card: rgba(18, 15, 35, 0.7);
    --bg-card-hover: rgba(25, 20, 50, 0.85);
    --bg-input: rgba(15, 12, 30, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.04);
    --bg-glass-hover: rgba(255, 255, 255, 0.08);

    --text-primary: #f0eef6;
    --text-secondary: #9d97b5;
    --text-muted: #5e5880;

    --accent-1: #8b5cf6;
    --accent-2: #06b6d4;
    --accent-3: #f43f5e;
    --accent-4: #f59e0b;
    --accent-5: #10b981;

    --gradient-primary: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 50%, #f43f5e 100%);
    --gradient-secondary: linear-gradient(135deg, #f43f5e 0%, #f59e0b 100%);
    --gradient-glass: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(6, 182, 212, 0.08));

    --border-subtle: rgba(139, 92, 246, 0.15);
    --border-glow: rgba(139, 92, 246, 0.4);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(139, 92, 246, 0.2);

    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms cubic-bezier(0.16, 1, 0.3, 1);

    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Outfit', 'Inter', sans-serif;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--accent-1);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-2);
}

/* --- Container --- */
.container {
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Section --- */
.section {
    padding: 100px 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-tag {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent-1);
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    margin-bottom: 16px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 16px;
}

.section-desc {
    font-size: 17px;
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.7;
}

/* --- Gradient Text --- */
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-alt {
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===========================
   NAVBAR
   =========================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 12px 0;
    transition: background var(--transition-base), box-shadow var(--transition-base);
}

.navbar.scrolled {
    background: rgba(7, 6, 13, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 var(--border-subtle);
}

.nav-container {
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    white-space: nowrap;
}

.logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
    font-size: 16px;
    color: white;
}

.logo-accent {
    color: var(--accent-1);
}

/* Nav Search */
.nav-search {
    flex: 1;
    max-width: 480px;
    position: relative;
}

.nav-search input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font-body);
    transition: all var(--transition-base);
    outline: none;
}

.nav-search input:focus {
    border-color: var(--accent-1);
    background: var(--bg-input);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.nav-search input::placeholder {
    color: var(--text-muted);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    pointer-events: none;
}

.search-kbd {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: var(--font-body);
    pointer-events: none;
}

.search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    max-height: 400px;
    overflow-y: auto;
    display: none;
    box-shadow: var(--shadow-lg);
    z-index: 100;
}

.search-results.active {
    display: block;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background var(--transition-fast);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.search-result-item:hover {
    background: var(--bg-glass-hover);
}

.search-result-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.search-result-info {
    flex: 1;
}

.search-result-name {
    font-size: 14px;
    font-weight: 600;
}

.search-result-type {
    font-size: 12px;
    color: var(--text-muted);
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-glass);
}

.nav-cta {
    position: relative;
    background: var(--gradient-primary);
    color: white;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    padding: 10px 24px;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    overflow: hidden;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    white-space: nowrap;
}

.nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
}

.cta-glow {
    position: absolute;
    inset: -2px;
    background: var(--gradient-primary);
    border-radius: inherit;
    opacity: 0;
    filter: blur(12px);
    transition: opacity var(--transition-base);
    z-index: -1;
}

.nav-cta:hover .cta-glow {
    opacity: 0.6;
}

/* ===========================
   HERO
   =========================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 120px 24px 80px;
}

#particleCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-2);
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.2);
    padding: 8px 20px;
    border-radius: var(--radius-full);
    margin-bottom: 28px;
    animation: fadeInUp 0.8s ease;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-2);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(40px, 7vw, 80px);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -2px;
    margin-bottom: 24px;
    animation: fadeInUp 0.8s ease 0.1s both;
}

.hero-subtitle {
    font-size: clamp(16px, 2vw, 19px);
    color: var(--text-secondary);
    max-width: 680px;
    margin: 0 auto 36px;
    line-height: 1.7;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 64px;
    animation: fadeInUp 0.8s ease 0.3s both;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    animation: fadeInUp 0.8s ease 0.5s both;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 36px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-plus,
.stat-label-inline {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 2px;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border-subtle);
}

.hero-gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
}

.hero-orb-1 {
    width: 600px;
    height: 600px;
    background: var(--accent-1);
    top: -200px;
    right: -100px;
    animation: floatOrb 15s ease-in-out infinite;
}

.hero-orb-2 {
    width: 500px;
    height: 500px;
    background: var(--accent-2);
    bottom: -150px;
    left: -100px;
    animation: floatOrb 18s ease-in-out infinite reverse;
}

.hero-orb-3 {
    width: 350px;
    height: 350px;
    background: var(--accent-3);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: floatOrb 12s ease-in-out infinite 3s;
}

/* ===========================
   BUTTONS
   =========================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-body);
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    padding: 14px 32px;
    border-radius: var(--radius-full);
    font-size: 15px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.4);
}

.btn-glass {
    background: var(--bg-glass);
    color: var(--text-primary);
    padding: 14px 32px;
    border-radius: var(--radius-full);
    font-size: 15px;
    border: 1px solid var(--border-subtle);
    backdrop-filter: blur(10px);
}

.btn-glass:hover {
    background: var(--bg-glass-hover);
    border-color: var(--border-glow);
}

.btn-lg {
    padding: 16px 36px;
    font-size: 16px;
}

.btn-sm {
    padding: 8px 18px;
    font-size: 13px;
}

.btn-generate {
    width: 100%;
    justify-content: center;
    padding: 16px 32px;
    font-size: 16px;
    margin-top: 8px;
    position: relative;
    overflow: hidden;
}

.btn-generate:active {
    transform: scale(0.98);
}

.btn-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.btn-generate.loading .btn-content {
    display: none;
}

.btn-generate.loading .btn-loader {
    display: inline-block;
}

/* ===========================
   AI MODELS SECTION
   =========================== */
.models-section {
    background: var(--bg-secondary);
}

.model-filters {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-glass);
    border: 1px solid transparent;
    padding: 8px 20px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-btn:hover {
    color: var(--text-primary);
    background: var(--bg-glass-hover);
}

.filter-btn.active {
    color: white;
    background: rgba(139, 92, 246, 0.2);
    border-color: var(--accent-1);
}

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

.model-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 28px;
    cursor: pointer;
    transition: all var(--transition-slow);
    position: relative;
    overflow: hidden;
}

.model-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-glass);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.model-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

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

.model-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.model-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.model-name {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
}

.model-provider {
    font-size: 13px;
    color: var(--text-muted);
}

.model-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.model-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    position: relative;
    z-index: 1;
}

.model-tag {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    background: rgba(139, 92, 246, 0.1);
    color: var(--accent-1);
    border: 1px solid rgba(139, 92, 246, 0.15);
}

.model-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    z-index: 1;
}

.model-badge.popular {
    background: rgba(244, 63, 94, 0.15);
    color: var(--accent-3);
    border: 1px solid rgba(244, 63, 94, 0.2);
}

.model-badge.new {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-5);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.model-badge.fast {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-4);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* ===========================
   STUDIO WORKSPACE
   =========================== */
.studio-workspace {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.studio-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    padding: 6px;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
}

.studio-tabs::-webkit-scrollbar {
    display: none;
}

.studio-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    background: transparent;
    border: none;
    padding: 12px 22px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.studio-tab svg {
    width: 18px;
    height: 18px;
}

.studio-tab:hover {
    color: var(--text-secondary);
    background: var(--bg-glass);
}

.studio-tab.active {
    color: white;
    background: var(--accent-1);
    box-shadow: 0 2px 12px rgba(139, 92, 246, 0.3);
}

.studio-panel {
    display: none;
    padding: 32px;
    animation: fadeIn 0.3s ease;
}

.studio-panel.active {
    display: block;
}

.panel-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
}

/* --- Form Elements --- */
.input-group {
    margin-bottom: 20px;
}

.input-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-textarea {
    width: 100%;
    padding: 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.input-textarea:focus {
    border-color: var(--accent-1);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.input-textarea::placeholder {
    color: var(--text-muted);
}

.textarea-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.char-count {
    font-size: 12px;
    color: var(--text-muted);
}

.input-select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239d97b5' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: border-color var(--transition-fast);
}

.input-select:focus {
    border-color: var(--accent-1);
}

.ratio-buttons,
.style-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ratio-btn,
.style-btn {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.ratio-btn:hover,
.style-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-glow);
}

.ratio-btn.active,
.style-btn.active {
    color: white;
    background: rgba(139, 92, 246, 0.2);
    border-color: var(--accent-1);
}

.duration-slider {
    display: flex;
    align-items: center;
    gap: 14px;
}

.slider {
    flex: 1;
    -webkit-appearance: none;
    height: 4px;
    background: rgba(139, 92, 246, 0.2);
    border-radius: 2px;
    outline: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: var(--accent-1);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.4);
    transition: transform var(--transition-fast);
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.slider-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-1);
    min-width: 48px;
    text-align: right;
}

/* Prompt Suggestions */
.prompt-suggestions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.suggestion-label {
    font-size: 13px;
    color: var(--text-muted);
}

.suggestion-chip {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 500;
    color: var(--accent-2);
    background: rgba(6, 182, 212, 0.08);
    border: 1px solid rgba(6, 182, 212, 0.15);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.suggestion-chip:hover {
    background: rgba(6, 182, 212, 0.15);
    border-color: rgba(6, 182, 212, 0.3);
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 48px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-base);
    margin-bottom: 24px;
}

.upload-zone:hover {
    border-color: var(--accent-1);
    background: rgba(139, 92, 246, 0.03);
}

.upload-icon {
    color: var(--text-muted);
    margin-bottom: 16px;
}

.upload-text {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
}

.upload-subtext {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* Voice Grid */
.voice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.voice-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.voice-card:hover {
    background: var(--bg-glass-hover);
    border-color: var(--border-glow);
}

.voice-card.selected {
    background: rgba(139, 92, 246, 0.12);
    border-color: var(--accent-1);
}

.voice-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.voice-name {
    font-size: 14px;
    font-weight: 600;
}

.voice-meta {
    font-size: 11px;
    color: var(--text-muted);
}

/* Avatar Picker in Studio */
.avatar-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.avatar-search-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    padding: 6px 14px;
}

.avatar-search-inline input {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 13px;
    font-family: var(--font-body);
    outline: none;
    width: 160px;
}

.avatar-search-inline input::placeholder {
    color: var(--text-muted);
}

.avatar-search-inline svg {
    color: var(--text-muted);
}

.avatar-quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    max-height: 320px;
    overflow-y: auto;
    padding: 4px;
}

.avatar-quick-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 8px;
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.avatar-quick-card:hover {
    background: var(--bg-glass-hover);
    border-color: var(--border-glow);
    transform: translateY(-2px);
}

.avatar-quick-card.selected {
    border-color: var(--accent-1);
    background: rgba(139, 92, 246, 0.1);
}

.avatar-quick-img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: white;
}

.avatar-quick-name {
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.browse-all-link {
    display: inline-block;
    margin-top: 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-1);
    transition: color var(--transition-fast);
}

.browse-all-link:hover {
    color: var(--accent-2);
}

/* ===========================
   AVATAR GALLERY
   =========================== */
.avatar-section {
    background: var(--bg-primary);
}

.avatar-controls {
    margin-bottom: 32px;
}

.avatar-search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    padding: 14px 24px;
    margin-bottom: 20px;
    transition: border-color var(--transition-fast);
}

.avatar-search-bar:focus-within {
    border-color: var(--accent-1);
}

.avatar-search-bar svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

.avatar-search-bar input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 15px;
    font-family: var(--font-body);
    outline: none;
}

.avatar-search-bar input::placeholder {
    color: var(--text-muted);
}

.avatar-count {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
}

.avatar-category-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.category-btn {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    padding: 8px 18px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.category-btn:hover {
    color: var(--text-primary);
    background: var(--bg-glass-hover);
}

.category-btn.active {
    color: white;
    background: rgba(139, 92, 246, 0.2);
    border-color: var(--accent-1);
}

.avatar-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}

.avatar-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 20px 12px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.avatar-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.avatar-img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 800;
    color: white;
    position: relative;
}

.avatar-img::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2px solid transparent;
    background: var(--gradient-primary) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.avatar-card:hover .avatar-img::after {
    opacity: 1;
}

.avatar-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.avatar-category-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.avatar-card-tags {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.avatar-mini-tag {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: rgba(139, 92, 246, 0.08);
    color: var(--accent-1);
}

/* Pagination */
.avatar-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

.page-btn {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.page-btn.active {
    color: white;
    background: var(--accent-1);
    border-color: var(--accent-1);
}

.page-btn.nav-arrow {
    font-size: 18px;
}

/* ===========================
   SHOWCASE
   =========================== */
.showcase-section {
    background: var(--bg-secondary);
}

.showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.showcase-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-slow);
}

.showcase-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.showcase-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    overflow: hidden;
}

.showcase-play {
    position: absolute;
    width: 56px;
    height: 56px;
    background: rgba(139, 92, 246, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: all var(--transition-base);
}

.showcase-card:hover .showcase-play {
    opacity: 1;
    transform: scale(1);
}

.showcase-play svg {
    width: 22px;
    height: 22px;
    fill: white;
    margin-left: 3px;
}

.showcase-info {
    padding: 20px;
}

.showcase-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
}

.showcase-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted);
}

.showcase-model-tag {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    background: rgba(6, 182, 212, 0.1);
    color: var(--accent-2);
}

/* ===========================
   FOOTER
   =========================== */
.footer {
    padding: 80px 0 32px;
    border-top: 1px solid var(--border-subtle);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 16px;
    line-height: 1.7;
    max-width: 320px;
}

.footer-socials {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all var(--transition-fast);
}

.social-link:hover {
    background: var(--accent-1);
    border-color: var(--accent-1);
    transform: translateY(-2px);
}

.footer-heading {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.footer-col {
    display: flex;
    flex-direction: column;
}

.footer-link {
    font-size: 14px;
    color: var(--text-secondary);
    padding: 6px 0;
    transition: color var(--transition-fast);
}

.footer-link:hover {
    color: var(--accent-1);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 32px;
    border-top: 1px solid var(--border-subtle);
    font-size: 13px;
    color: var(--text-muted);
}

.footer-bottom-links {
    display: flex;
    gap: 24px;
}

.footer-bottom-links a {
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.footer-bottom-links a:hover {
    color: var(--text-primary);
}

/* ===========================
   MODALS
   =========================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 24px;
}

.modal-overlay.active {
    display: flex;
}

.modal-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    max-width: 520px;
    width: 100%;
    padding: 48px;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--bg-glass-hover);
    color: var(--text-primary);
}

.modal-generating {
    text-align: center;
}

.gen-animation {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gen-ring {
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    border-top-color: var(--accent-1);
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
}

.gen-ring.ring-2 {
    inset: 8px;
    border-top-color: var(--accent-2);
    animation-duration: 2s;
    animation-direction: reverse;
}

.gen-ring.ring-3 {
    inset: 16px;
    border-top-color: var(--accent-3);
    animation-duration: 2.5s;
}

.gen-icon {
    color: var(--accent-1);
    z-index: 1;
}

.gen-title {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.gen-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.gen-progress {
    width: 100%;
    height: 4px;
    background: rgba(139, 92, 246, 0.15);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 16px;
}

.gen-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--gradient-primary);
    border-radius: 2px;
    transition: width 0.3s ease;
}

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

/* Avatar Detail Modal */
.modal-avatar-detail {
    max-width: 560px;
    padding: 40px;
}

.avatar-detail-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.avatar-detail-img {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    font-weight: 800;
    color: white;
}

.avatar-detail-name {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
}

.avatar-detail-category {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

.avatar-detail-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.avatar-stat {
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
}

.avatar-stat-value {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-1);
}

.avatar-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.avatar-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 24px;
}

.avatar-detail-actions {
    display: flex;
    gap: 12px;
}

/* ===========================
   ANIMATIONS
   =========================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes pulse {

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

    50% {
        opacity: 0.5;
        transform: scale(1.5);
    }
}

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

@keyframes floatOrb {

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

    33% {
        transform: translate(30px, -30px);
    }

    66% {
        transform: translate(-20px, 20px);
    }
}

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

    100% {
        background-position: 200% 0;
    }
}

/* Reveal animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 1024px) {
    .panel-layout {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .avatar-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

@media (max-width: 768px) {

    .nav-links,
    .search-kbd {
        display: none;
    }

    .nav-search {
        max-width: 280px;
    }

    .hero-title {
        letter-spacing: -1px;
    }

    .hero-stats {
        gap: 20px;
    }

    .stat-divider {
        display: none;
    }

    .studio-tabs {
        padding: 4px;
    }

    .studio-tab span,
    .studio-tab {
        font-size: 12px;
        padding: 10px 14px;
    }

    .studio-panel {
        padding: 20px;
    }

    .models-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .showcase-grid {
        grid-template-columns: 1fr;
    }

    .avatar-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }

    .avatar-detail-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .avatar-detail-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 100px 16px 60px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn-lg {
        width: 100%;
        justify-content: center;
    }

    .avatar-quick-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
}

/* ===========================
   MODEL CARD IMAGES
   =========================== */
.model-card-image {
    width: 100%;
    height: 160px;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.model-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.model-card:hover .model-card-image img {
    transform: scale(1.05);
}

/* ===========================
   GENERATION RESULT
   =========================== */
.generation-result {
    margin-top: 24px;
    animation: fadeInUp 0.5s ease;
}

.result-container {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.result-header h4 {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-5);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

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

.result-btn {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 6px;
}

.result-btn:hover {
    color: var(--text-primary);
    background: var(--bg-glass-hover);
    border-color: var(--border-glow);
}

.result-btn.primary {
    background: rgba(139, 92, 246, 0.15);
    color: var(--accent-1);
    border-color: rgba(139, 92, 246, 0.3);
}

/* Video Player */
.video-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.video-player .video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
}

.video-player .video-gradient-bg {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
}

.video-play-btn {
    position: relative;
    z-index: 2;
    width: 72px;
    height: 72px;
    background: rgba(139, 92, 246, 0.85);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
    color: white;
}

.video-play-btn:hover {
    transform: scale(1.1);
    background: rgba(139, 92, 246, 1);
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.5);
}

.video-play-btn svg {
    width: 28px;
    height: 28px;
    margin-left: 3px;
}

.video-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.5);
}

.video-timeline {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.video-timeline-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

.video-time {
    font-size: 12px;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

/* Audio Waveform */
.waveform-container {
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.waveform-visual {
    display: flex;
    align-items: center;
    gap: 2px;
    height: 64px;
    justify-content: center;
}

.waveform-bar {
    width: 3px;
    background: var(--accent-1);
    border-radius: 2px;
    transition: height 0.1s ease;
    min-height: 4px;
}

.waveform-bar.active {
    background: var(--gradient-primary);
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.4);
}

.waveform-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.waveform-play-btn {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.waveform-play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}

/* Avatar Speaking Animation */
.avatar-speaking-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 20px;
    gap: 20px;
}

.avatar-speaking-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid var(--accent-1);
    position: relative;
    overflow: hidden;
}

.avatar-speaking-img img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-speaking-img .avatar-initials-circle {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 36px;
    font-weight: 700;
    color: white;
}

.avatar-speaking-img.speaking {
    animation: speakingPulse 0.5s ease-in-out infinite alternate;
}

.avatar-speaking-rings {
    position: absolute;
    inset: -8px;
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 50%;
    animation: speakingRing 1.5s ease-out infinite;
}

.avatar-speaking-name {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
}

.avatar-speaking-text {
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
    max-width: 400px;
    line-height: 1.6;
}

@keyframes speakingPulse {
    from {
        transform: scale(1);
        border-color: var(--accent-1);
    }

    to {
        transform: scale(1.03);
        border-color: var(--accent-2);
    }
}

@keyframes speakingRing {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

/* Avatar Images in Gallery */
.avatar-card .avatar-img {
    position: relative;
    overflow: hidden;
}

.avatar-card .avatar-img img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    position: absolute;
    inset: 0;
}

.avatar-card .avatar-img .avatar-fallback {
    position: relative;
    z-index: 1;
}

/* Voice Preview in Studio */
.voice-preview-btn {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-2);
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.2);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.voice-preview-btn:hover {
    background: rgba(6, 182, 212, 0.2);
    border-color: var(--accent-2);
}

.voice-preview-btn.playing {
    color: var(--accent-3);
    background: rgba(244, 63, 94, 0.1);
    border-color: rgba(244, 63, 94, 0.3);
}

/* Selected avatar in picker */
.avatar-quick-card.selected {
    border-color: var(--accent-1) !important;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

.avatar-quick-card.selected::after {
    content: '✓';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background: var(--accent-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: white;
    font-weight: 700;
}

/* Result video animation */
@keyframes videoScan {
    0% {
        background-position: 0% 0%;
    }

    50% {
        background-position: 100% 100%;
    }

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

.video-scan-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            transparent 0%,
            rgba(139, 92, 246, 0.05) 25%,
            transparent 50%,
            rgba(6, 182, 212, 0.05) 75%,
            transparent 100%);
    background-size: 400% 400%;
    animation: videoScan 8s ease infinite;
    pointer-events: none;
    z-index: 1;
}

/* ===========================================
   GENERATION RESULTS
   =========================================== */
.video-result-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-top: 24px;
    animation: fadeInUp 0.5s ease;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.result-badge {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-1);
    background: rgba(139, 92, 246, 0.1);
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

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

.btn-icon {
    background: var(--bg-glass);
    border: none;
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--bg-glass-hover);
    color: white;
}

.video-player-mock {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background-color: #000;
    background-size: cover;
    background-position: center;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.panel-sidebar .video-player-mock {
    aspect-ratio: 9/16;
    /* Vertical for sidebar if needed, but results are in main usually */
}

/* Ensure sidebar results adapt */
#panel-text-to-video .video-player-mock {
    aspect-ratio: 16/9;
}

#panel-image-to-video .video-player-mock {
    aspect-ratio: 16/9;
}

.video-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
    cursor: pointer;
}

.video-player-mock:hover .video-overlay {
    background: rgba(0, 0, 0, 0.4);
}

.play-button-lg {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    padding-left: 4px;
    /* Optical center */
}

.video-player-mock:hover .play-button-lg {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.3);
}

.video-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
}

.video-progress-fill {
    width: 0%;
    height: 100%;
    background: var(--accent-1);
    animation: progressFill 10s linear forwards;
}

@keyframes progressFill {
    from {
        width: 0%;
    }

    to {
        width: 100%;
    }
}

.result-prompt {
    font-size: 14px;
    color: var(--text-secondary);
    font-style: italic;
    line-height: 1.5;
}

/* Audio Player Mock */
.audio-player-mock {
    background: var(--bg-input);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.play-button-sm {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-1);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.waveform-viz {
    flex: 1;
    height: 40px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.wave-bar {
    flex: 1;
    background: var(--text-muted);
    border-radius: 2px;
    animation: waveAnim 1s ease-in-out infinite;
}

@keyframes waveAnim {

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

    50% {
        transform: scaleY(1);
        opacity: 1;
        background: var(--accent-1);
    }
}

.audio-time {
    font-size: 12px;
    font-family: monospace;
    color: var(--text-muted);
}

.ken-burns {
    animation: kenBurns 20s ease-in-out infinite alternate;
}

@keyframes kenBurns {
    0% {
        background-position: center;
        background-size: 100%;
    }

    100% {
        background-position: center;
        background-size: 110%;
    }
}

.head-move-anim {
    animation: headMove 5s ease-in-out infinite;
}

@keyframes headMove {

    0%,
    100% {
        background-position: 50% 50%;
    }

    50% {
        background-position: 52% 48%;
    }
}

/* ===========================================
   GENERATION RESULTS
   =========================================== */
.video-result-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-top: 24px;
    animation: fadeInUp 0.5s ease;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.result-badge {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-1);
    background: rgba(139, 92, 246, 0.1);
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

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

.btn-icon {
    background: var(--bg-glass);
    border: none;
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--bg-glass-hover);
    color: white;
}

.video-player-mock {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background-color: #000;
    background-size: cover;
    background-position: center;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.panel-sidebar .video-player-mock {
    aspect-ratio: 9/16;
    /* Vertical for sidebar if needed, but results are in main usually */
}

/* Ensure sidebar results adapt */
#panel-text-to-video .video-player-mock {
    aspect-ratio: 16/9;
}

#panel-image-to-video .video-player-mock {
    aspect-ratio: 16/9;
}

.video-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
    cursor: pointer;
}

.video-player-mock:hover .video-overlay {
    background: rgba(0, 0, 0, 0.4);
}

.play-button-lg {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    padding-left: 4px;
    /* Optical center */
}

.video-player-mock:hover .play-button-lg {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.3);
}

.video-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
}

.video-progress-fill {
    width: 0%;
    height: 100%;
    background: var(--accent-1);
    animation: progressFill 10s linear forwards;
}

@keyframes progressFill {
    from {
        width: 0%;
    }

    to {
        width: 100%;
    }
}

.result-prompt {
    font-size: 14px;
    color: var(--text-secondary);
    font-style: italic;
    line-height: 1.5;
}

/* Audio Player Mock */
.audio-player-mock {
    background: var(--bg-input);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.play-button-sm {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-1);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.waveform-viz {
    flex: 1;
    height: 40px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.wave-bar {
    flex: 1;
    background: var(--text-muted);
    border-radius: 2px;
    animation: waveAnim 1s ease-in-out infinite;
}

@keyframes waveAnim {

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

    50% {
        transform: scaleY(1);
        opacity: 1;
        background: var(--accent-1);
    }
}

.audio-time {
    font-size: 12px;
    font-family: monospace;
    color: var(--text-muted);
}

.ken-burns {
    animation: kenBurns 20s ease-in-out infinite alternate;
}

@keyframes kenBurns {
    0% {
        background-position: center;
        background-size: 100%;
    }

    100% {
        background-position: center;
        background-size: 110%;
    }
}

.head-move-anim {
    animation: headMove 5s ease-in-out infinite;
}

@keyframes headMove {

    0%,
    100% {
        background-position: 50% 50%;
    }

    50% {
        background-position: 52% 48%;
    }
}

/* Active Playback States */
.video-player-mock.playing .video-overlay {
    background: rgba(0, 0, 0, 0.1);
    /* Lighter overlay when playing */
}

.video-player-mock.playing .play-button-lg {
    opacity: 0;
    pointer-events: none;
    /* Hide play button */
}

.video-player-mock:hover .play-button-lg,
.video-player-mock.playing:hover .play-button-lg {
    opacity: 1;
    pointer-events: auto;
    transform: scale(0.8);
    /* Smaller when hovering playing video */
}

.active-playback.ken-burns {
    animation-duration: 10s;
    /* Faster for playback */
}

.active-playback.head-move-anim {
    animation-duration: 2s;
    /* Faster for talking */
}