/* === CREATOR STUDIO PRO MAX (THEME: OBSIDIAN AURORA) === */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Be+Vietnam+Pro:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Colors */
    --bg-void: #020617;
    /* Deepest Black/Blue */
    --bg-surface: #0f172a;
    /* Panel Background */
    --primary: #3b82f6;
    /* Brand Blue */
    --primary-glow: rgba(59, 130, 246, 0.4);
    --cyan: #06b6d4;
    /* Accent Cyan */
    --purple: #475569;
    /* Accent Purple */
    --orange: #f97316;
    /* Warning/action */
    --success: #10b981;
    /* Success */

    --text-main: #ffffff;
    --text-muted: #94a3b8;

    /* Glass Effect Tokens */
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(15, 23, 42, 0.6);
    --glass-hover: rgba(255, 255, 255, 0.05);

    /* Gradients */
    --grad-aurora: linear-gradient(135deg, var(--primary), var(--cyan));
    --grad-fire: linear-gradient(135deg, #f59e0b, #ef4444);
    --grad-magic: linear-gradient(135deg, #1d4ed8, #0ea5e9);
    /* Blue -> Sky */

    /* Fonts */
    --font-heading: 'Plus Jakarta Sans', sans-serif;
    --font-ui: 'Be Vietnam Pro', sans-serif;

    /* AI Scanning Colors */
    --scan-primary: #3b82f6;
    --scan-secondary: #06b6d4;
}

/* AI Scanning Modal */
.scanning-modal {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.95);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: modalFadeIn 0.3s ease;
}

.scanning-modal.fade-out {
    animation: modalFadeOut 0.3s ease forwards;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes modalFadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

.scanning-content {
    text-align: center;
    max-width: 400px;
    padding: 40px;
}

.scanning-brain {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scanning-brain i {
    font-size: 48px;
    color: var(--scan-primary);
    animation: brainPulse 2s ease-in-out infinite;
    z-index: 2;
}

@keyframes brainPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.brain-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid transparent;
}

.brain-ring.ring-1 {
    width: 80px;
    height: 80px;
    border-color: var(--scan-primary);
    opacity: 0.3;
    animation: ringRotate 3s linear infinite;
}

.brain-ring.ring-2 {
    width: 100px;
    height: 100px;
    border-color: var(--scan-secondary);
    opacity: 0.2;
    animation: ringRotate 4s linear infinite reverse;
}

.brain-ring.ring-3 {
    width: 120px;
    height: 120px;
    border-top-color: var(--scan-primary);
    border-right-color: var(--scan-secondary);
    opacity: 0.4;
    animation: ringRotate 2s linear infinite;
}

@keyframes ringRotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.scanning-title {
    font-size: 20px;
    font-weight: 700;
    color: white;
    margin-bottom: 24px;
}

.scanning-progress {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 30px;
}

.scanning-progress .progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--scan-primary), var(--scan-secondary));
    border-radius: 4px;
    animation: progressFill 12s ease-in-out forwards;
}

@keyframes progressFill {
    0% {
        width: 0%;
    }

    25% {
        width: 25%;
    }

    50% {
        width: 55%;
    }

    75% {
        width: 80%;
    }

    100% {
        width: 95%;
    }
}

.scanning-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
}

/* Script Type Selection Modal */
.script-modal {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.9);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.script-modal.show {
    opacity: 1;
    visibility: visible;
}

.script-modal.hidden {
    opacity: 0;
    visibility: hidden;
}

.script-modal-content {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.btn-close-modal {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-close-modal:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.modal-header {
    text-align: center;
    margin-bottom: 24px;
}

.modal-header i {
    font-size: 36px;
    margin-bottom: 12px;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
}

.modal-header p {
    font-size: 13px;
    color: var(--text-muted);
}

.script-types-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.script-type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 18px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.25s;
}

.script-type-card:hover {
    background: rgba(37, 99, 235, 0.1);
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.2);
}

.script-type-card i {
    font-size: 28px;
    color: var(--primary);
}

.script-type-card span {
    font-size: 13px;
    font-weight: 600;
    color: white;
}

.script-type-card small {
    font-size: 10px;
    color: var(--text-muted);
    text-align: center;
}

.modal-footer {
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid var(--glass-border);
}

.modal-footer small {
    color: var(--text-muted);
    font-size: 12px;
}

@media (max-width: 600px) {
    .script-types-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .script-modal-content {
        padding: 20px;
    }
}

.scan-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-muted);
    opacity: 0.5;
    transition: all 0.3s;
}

.scan-step i {
    font-size: 18px;
    width: 24px;
}

.scan-step span {
    font-size: 13px;
    font-weight: 500;
}

.scan-step.active {
    opacity: 1;
    border-color: var(--scan-primary);
    background: rgba(139, 92, 246, 0.1);
    color: white;
}

.scan-step.active i {
    color: var(--scan-primary);
    animation: stepPulse 1s ease-in-out infinite;
}

@keyframes stepPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    outline: none;
}

body {
    background-color: var(--bg-void);
    color: var(--text-main);
    font-family: var(--font-ui);
    overflow: hidden;
    /* App-like Experience */
    height: 100vh;
    font-size: 15px;
}

/* === BACKGROUND FX === */
.studio-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: radial-gradient(circle at top center, #1e293b 0%, #020617 60%);
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.3;
    animation: float 20s infinite ease-in-out;
}

.orb-1 {
    top: -20%;
    left: -10%;
    width: 60vw;
    height: 60vw;
    background: var(--primary);
}

.orb-2 {
    bottom: -20%;
    right: -10%;
    width: 50vw;
    height: 50vw;
    background: var(--cyan);
    animation-delay: -5s;
}

.noise {
    position: fixed;
    inset: 0;
    opacity: 0.03;
    pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(30px, -30px);
    }
}

/* === LAYOUT GRID === */
.studio-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    height: 100vh;
}

/* === SIDEBAR GLASS === */
.sidebar {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    padding: 24px;
    display: flex;
    flex-direction: column;
    z-index: 50;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    padding-left: 8px;
}

.brand img {
    height: 32px;
}

.brand h2 {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 12px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
}

.nav-item i {
    font-size: 20px;
    transition: 0.2s;
}

.nav-item:hover {
    background: var(--glass-hover);
    color: white;
    transform: translateX(4px);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.15), transparent);
    border-left: 3px solid var(--primary);
    color: white;
    font-weight: 600;
}

.nav-item.active i {
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary-glow);
}

.user-card {
    margin-top: auto;
    padding: 16px;
    background: var(--glass-hover);
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: 0.2s;
}

.user-card:hover {
    border-color: var(--primary);
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--grad-aurora);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* === MAIN CONTENT === */
.main-area {
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    display: flex;
    flex-direction: column;
}

/* Top Bar */
.top-bar {
    position: sticky;
    top: 0;
    z-index: 40;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(2, 6, 23, 0.7);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
}

.page-title h1 {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
}

.page-title span {
    color: var(--text-muted);
    font-size: 14px;
}

.actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

.credits-pill {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success);
    padding: 8px 16px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.1);
}

/* Content Container */
.content-wrapper {
    padding: 40px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* === BENTO GRID === */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.bento-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: 0.3s;
}

.bento-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-4px);
}

.span-2 {
    grid-column: span 2;
}

.span-3 {
    grid-column: span 3;
}

/* Hero Download Card */
.hero-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 300px;
}

.hero-card h2 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.2;
}

.highlight {
    color: var(--primary);
    text-shadow: 0 0 20px var(--primary-glow);
}

/* Platform Cards (Modern Glassmorphism) */
/* ===================================================
   PLATFORM CARDS REDESIGN - PRO MAX UI
   Glassmorphism + Neon Glow + Smooth Interactions
=================================================== */

.platform-cards {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.platform-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px 24px;
    min-width: 130px;

    /* Glassmorphism Base */
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;

    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    overflow: hidden;
}

/* Hover State - Lift & Subtle Glow */
.platform-card:hover {
    transform: translateY(-6px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3);
}

.platform-card:hover .platform-icon {
    transform: scale(1.05) rotate(3deg);
}

/* ICON STYLING - iOS App Icon Style */
.platform-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 2;
}

.platform-icon svg {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* TikTok Icon Theme */
.platform-icon.tiktok {
    background: linear-gradient(145deg, #111, #000);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.platform-icon.tiktok svg path {
    fill: #25F4EE;
    /* Cyan Logo */
}

/* Facebook Icon Theme */
.platform-icon.facebook {
    background: linear-gradient(145deg, #1877F2, #0d5bc1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* YouTube Icon Theme */
.platform-icon.youtube {
    background: linear-gradient(145deg, #FF0000, #cc0000);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* TEXT STYLING */
.platform-name {
    font-family: var(--font-head);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 0.3px;
}

.platform-tag {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 12px;
    transition: all 0.3s;
}

/* ACTIVE STATE - NEON GLOW */
.platform-card.active {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.08) 100%);
}

/* TikTok Active */
.platform-card[data-platform="tiktok"].active {
    border-color: #25F4EE;
    box-shadow: 0 0 24px rgba(37, 244, 238, 0.15), inset 0 0 12px rgba(37, 244, 238, 0.05);
}

.platform-card[data-platform="tiktok"].active .platform-icon {
    box-shadow: 0 0 20px rgba(37, 244, 238, 0.4);
    border-color: rgba(37, 244, 238, 0.5);
}

.platform-card[data-platform="tiktok"].active .platform-tag {
    color: #25F4EE;
    background: rgba(37, 244, 238, 0.1);
}

/* Facebook Active */
.platform-card[data-platform="facebook"].active {
    border-color: #1877F2;
    box-shadow: 0 0 24px rgba(24, 119, 242, 0.2), inset 0 0 12px rgba(24, 119, 242, 0.05);
}

.platform-card[data-platform="facebook"].active .platform-icon {
    box-shadow: 0 0 20px rgba(24, 119, 242, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
}

.platform-card[data-platform="facebook"].active .platform-tag {
    color: #60a5fa;
    background: rgba(24, 119, 242, 0.1);
}

/* YouTube Active */
.platform-card[data-platform="youtube"].active {
    border-color: #FF0000;
    box-shadow: 0 0 24px rgba(255, 0, 0, 0.2), inset 0 0 12px rgba(255, 0, 0, 0.05);
}

.platform-card[data-platform="youtube"].active .platform-icon {
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
}

.platform-card[data-platform="youtube"].active .platform-tag {
    color: #fca5a5;
    background: rgba(255, 0, 0, 0.1);
}


/* BOTTOM INDICATOR - The "Dash" */
.platform-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 40px;
    height: 4px;
    border-radius: 4px 4px 0 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0;
}

.platform-card.active::after {
    transform: translateX(-50%) scaleX(1);
    opacity: 1;
}

.platform-card[data-platform="tiktok"].active::after {
    background: #25F4EE;
    box-shadow: 0 -2px 8px rgba(37, 244, 238, 0.5);
}

.platform-card[data-platform="facebook"].active::after {
    background: #1877F2;
    box-shadow: 0 -2px 8px rgba(24, 119, 242, 0.5);
}

.platform-card[data-platform="youtube"].active::after {
    background: #FF0000;
    box-shadow: 0 -2px 8px rgba(255, 0, 0, 0.5);
}

@media (max-width: 480px) {
    .platform-cards {
        gap: 12px;

    }

    .platform-card {
        flex: 1;
        min-width: 80px;
        padding: 12px;
    }

    .platform-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .platform-name {
        font-size: 12px;
    }

    .platform-tag {
        display: none;
    }
}

/* Brand Info Collapsible Form */
.brand-info-section {
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
}

.brand-info-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.brand-info-toggle:hover {
    background: rgba(255, 255, 255, 0.06);
}

.brand-caret {
    transition: transform 0.3s;
    color: var(--text-muted);
}

.brand-info-toggle.active .brand-caret {
    transform: rotate(180deg);
}

.brand-info-form {
    padding: 16px;
    background: rgba(15, 23, 42, 0.5);
    border-top: 1px solid var(--glass-border);
}

.brand-info-form.hidden {
    display: none;
}

.brand-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.brand-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.brand-field.full-width {
    grid-column: 1 / -1;
}

.brand-field label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.brand-field label i {
    color: var(--primary);
    font-size: 14px;
}

.brand-field input,
.brand-field select {
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: white;
    font-size: 13px;
    transition: all 0.2s;
}

.brand-field input:focus,
.brand-field select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

.brand-field input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.brand-field 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='%2394a3b8' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.brand-field select option {
    background: #1e293b;
    color: white;
}

@media (max-width: 600px) {
    .brand-form-grid {
        grid-template-columns: 1fr;
    }

    .brand-field.full-width {
        grid-column: 1;
    }
}

/* AI Tools Grid (4 buttons) */
.ai-tools-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.btn-ai-tool {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: white;
    cursor: pointer;
    transition: all 0.25s;
    position: relative;
    overflow: hidden;
}

.btn-ai-tool::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--tool-color), transparent);
    opacity: 0;
    transition: opacity 0.25s;
}

.btn-ai-tool:hover::before {
    opacity: 0.15;
}

.btn-ai-tool:hover {
    border-color: var(--tool-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.btn-ai-tool i {
    font-size: 24px;
    color: var(--tool-color);
    position: relative;
    z-index: 1;
}

.btn-ai-tool span {
    font-size: 13px;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.btn-ai-tool small {
    font-size: 10px;
    color: var(--text-muted);
    position: relative;
    z-index: 1;
}

@media (max-width: 700px) {
    .ai-tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* AI Result Card - Full Width */
.ai-result-card {
    grid-column: 1 / -1;
    min-height: 200px;
}

.ai-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--glass-border);
}

.ai-result-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
}

.btn-collapse {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-collapse:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.btn-collapse.collapsed i {
    transform: rotate(180deg);
}

.ai-output-content {
    transition: all 0.3s;
}

.ai-output-content.collapsed {
    display: none;
}

.ai-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
}

.ai-empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.ai-empty-state p {
    font-size: 14px;
    max-width: 300px;
}

/* AI Analysis Result Sections */
.ai-result-section {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

.ai-result-section:last-child {
    margin-bottom: 0;
}

.ai-result-section h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
}

.ai-score-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 100px;
    font-weight: 700;
    font-size: 14px;
}

.ai-score-badge.score-s {
    background: linear-gradient(135deg, #10b981, #06b6d4);
}

.ai-score-badge.score-a {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
}

.ai-score-badge.score-b {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.ai-score-badge.score-c {
    background: linear-gradient(135deg, #6b7280, #4b5563);
}

.ai-viral-score {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(6, 182, 212, 0.1));
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 16px;
    margin-bottom: 20px;
}

.ai-viral-score .score-ring {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: conic-gradient(var(--primary) calc(var(--score) * 1%), rgba(255, 255, 255, 0.1) 0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    position: relative;
}

.ai-viral-score .score-ring::before {
    content: '';
    position: absolute;
    width: 50px;
    height: 50px;
    background: var(--bg-surface);
    border-radius: 50%;
}

.ai-viral-score .score-ring span {
    position: relative;
    z-index: 1;
}

.ai-viral-score .score-info h4 {
    font-size: 16px;
    margin-bottom: 4px;
    color: white;
}

.ai-viral-score .score-info p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Product Info Card */
.ai-product-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.ai-product-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 16px;
}

.ai-product-item .item-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.ai-product-item .item-value {
    font-size: 14px;
    font-weight: 600;
    color: white;
}

/* Hooks Result Styles */
.hooks-result {
    animation: fadeIn 0.3s ease;
}

.hooks-header {
    margin-bottom: 20px;
}

.hooks-header h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    color: white;
}

.hooks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.hook-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 18px;
    transition: all 0.2s;
    position: relative;
}

.hook-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.hook-card.top-recommended {
    border-color: rgba(139, 92, 246, 0.4);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(6, 182, 212, 0.05));
}

.hook-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.hook-type {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary);
    background: rgba(6, 182, 212, 0.1);
    padding: 4px 10px;
    border-radius: 6px;
}

.top-badge {
    font-size: 11px;
    font-weight: 700;
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.15);
    padding: 4px 10px;
    border-radius: 6px;
}

/* Script Results Styles */
.scripts-result {
    animation: fadeIn 0.3s ease;
}

.scripts-header h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
}

.scripts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.script-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 18px;
    transition: all 0.2s;
}

.script-card.best-pick {
    border-color: rgba(251, 191, 36, 0.4);
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.08), rgba(6, 182, 212, 0.05));
}

.script-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.script-framework {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-pink);
    background: rgba(236, 72, 153, 0.1);
    padding: 4px 10px;
    border-radius: 6px;
}

/* Platform Optimization Cards */
.platform-optimization {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--glass-border);
}

.platform-optimization h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
}

.platform-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.platform-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 16px;
    transition: all 0.2s;
}

.platform-card:hover {
    border-color: var(--platform-color);
    background: rgba(255, 255, 255, 0.04);
}

.platform-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.platform-header i {
    font-size: 22px;
    color: var(--platform-color);
}

.platform-header span {
    font-size: 13px;
    font-weight: 700;
    color: white;
}

.platform-score {
    margin-left: auto;
    font-size: 14px;
    font-weight: 800;
    color: var(--platform-color);
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: 6px;
}

.platform-section {
    margin-bottom: 10px;
}

.platform-section strong {
    font-size: 11px;
    color: var(--text-muted);
}

.platform-section ul {
    list-style: none;
    padding: 0;
    margin: 6px 0 0;
}

.platform-section li {
    font-size: 11px;
    color: var(--text-primary);
    padding: 4px 0;
    padding-left: 12px;
    position: relative;
}

.platform-section li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--platform-color);
}

.platform-section.strengths li::before {
    color: var(--success);
}

.platform-section.weaknesses li::before {
    color: #f59e0b;
}

.platform-section.recommendations li::before {
    color: var(--primary);
}

@media (max-width: 900px) {
    .platform-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .platform-grid {
        grid-template-columns: 1fr;
    }
}

.best-badge {
    font-size: 11px;
    font-weight: 700;
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.15);
    padding: 4px 10px;
    border-radius: 6px;
}

.script-duration {
    font-size: 11px;
    color: var(--text-muted);
    margin-left: auto;
}

.script-section {
    margin-bottom: 12px;
}

.script-section strong {
    font-size: 12px;
    color: var(--text-muted);
}

.script-section p {
    font-size: 14px;
    color: white;
    line-height: 1.5;
    margin-top: 4px;
}

.btn-copy-script {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: rgba(236, 72, 153, 0.1);
    border: 1px solid rgba(236, 72, 153, 0.3);
    border-radius: 8px;
    color: var(--accent-pink);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    justify-content: center;
}

.btn-copy-script:hover {
    background: var(--accent-pink);
    color: white;
}

/* Policy Results Styles */
.policy-result {
    animation: fadeIn 0.3s ease;
}

.policy-status {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid;
    border-radius: 16px;
    margin-bottom: 20px;
}

.status-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.status-info h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
}

.status-info p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

.violations-list h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
}

.violation-card {
    background: rgba(239, 68, 68, 0.05);
    border-left: 3px solid #ef4444;
    border-radius: 0 12px 12px 0;
    padding: 16px;
    margin-bottom: 12px;
}

.violation-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.violation-rule {
    font-size: 12px;
    font-weight: 700;
    color: white;
}

.violation-severity {
    font-size: 11px;
    font-weight: 700;
}

.violation-detail {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 10px;
}

.violation-card blockquote {
    font-size: 12px;
    font-style: italic;
    color: var(--text-muted);
    border-left: 2px solid var(--glass-border);
    padding-left: 10px;
    margin: 10px 0;
}

.violation-fix {
    font-size: 12px;
    color: var(--success);
    background: rgba(16, 185, 129, 0.08);
    padding: 8px 12px;
    border-radius: 8px;
}

.hook-text {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    color: white;
    margin-bottom: 12px;
    font-style: italic;
}

.hook-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
    line-height: 1.5;
}

.hook-meta strong {
    color: var(--text-primary);
}

.btn-copy-hook {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}

.btn-copy-hook:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.tips-list {
    list-style: none;
    padding: 0;
}

.tips-list li {
    padding: 10px 14px;
    background: rgba(16, 185, 129, 0.08);
    border-left: 3px solid var(--success);
    margin-bottom: 8px;
    border-radius: 0 8px 8px 0;
    font-size: 13px;
    color: var(--text-primary);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.search-bar {
    position: relative;
    margin-top: 24px;
    margin-bottom: 16px;
    background: rgba(2, 6, 23, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 4px;
    display: flex;
}

.search-bar input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    padding: 16px 20px;
    font-size: 16px;
}

.btn-download-hero {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0 32px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 0 20px var(--primary-glow);
}

.btn-download-hero:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
}

/* Professional Score Header */
.score-header-pro {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(6, 182, 212, 0.05));
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.tier-display {
    display: flex;
    align-items: center;
    gap: 16px;
}

.tier-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 2px solid;
}

.tier-badge.tier-s {
    border-color: #fbbf24;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(251, 191, 36, 0.05));
}

.tier-badge.tier-a {
    border-color: #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.05));
}

/* REDEFINED PURPLE CLASSES FOR BLUE THEME */
.gradient-purple {
    background: linear-gradient(135deg, #475569, #64748b);
    /* Slate */
}

.tier-badge.tier-b {
    border-color: #0ea5e9;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(14, 165, 233, 0.05));
}

.tier-badge.tier-c {
    border-color: #f97316;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.2), rgba(249, 115, 22, 0.05));
}

.tier-letter {
    font-size: 32px;
    font-weight: 900;
    line-height: 1;
}

.tier-badge.tier-s .tier-letter {
    color: #fbbf24;
}

.tier-badge.tier-a .tier-letter {
    color: #10b981;
}

.tier-badge.tier-b .tier-letter {
    color: #06b6d4;
}

.tier-badge.tier-c .tier-letter {
    color: #f97316;
}

.tier-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-top: 4px;
}

.score-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}

.score-value {
    font-size: 28px;
    font-weight: 800;
    color: white;
}

.score-label {
    font-size: 11px;
    color: var(--text-muted);
}

.critique-box {
    flex: 1;
    min-width: 200px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border-left: 3px solid var(--secondary);
}

.critique-box h4 {
    font-size: 13px;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
}

.critique-box p {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.6;
}

@media (max-width: 600px) {
    .score-header-pro {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .tier-display {
        width: 100%;
        justify-content: center;
    }

    .critique-box {
        border-left: none;
        border-top: 1px solid var(--glass-border);
        padding-top: 16px;
    }
}

/* === INLINE DOWNLOAD RESULT === */
.download-result {
    margin-top: 20px;
    animation: fadeInUp 0.3s ease;
}

.download-result.hidden {
    display: none;
}

.result-loading {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
}

.result-loading p {
    color: var(--text-muted);
    margin: 0;
}

.result-error {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
}

.result-error i {
    font-size: 32px;
    color: #ef4444;
}

.result-error h4 {
    color: #ef4444;
    margin: 0 0 4px;
    font-size: 14px;
}

.result-error p {
    color: #fca5a5;
    margin: 0;
    font-size: 13px;
}

.result-error .btn-retry {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: white;
    cursor: pointer;
}

.result-success {
    position: relative;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(6, 182, 212, 0.1));
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 16px;
    padding: 20px;
}

.btn-close-result {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    transition: 0.2s;
}

.btn-close-result:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Modern Video Preview Card */
.video-preview-card {
    position: relative;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 24px;
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

.btn-close-preview {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 32px;
    height: 32px;
    border-radius: 10px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
}

.btn-close-preview:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.preview-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
    margin-bottom: 20px;
}

.preview-thumbnail-wrap {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 9/16;
    max-height: 340px;
    background: rgba(0, 0, 0, 0.3);
}

.preview-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-thumbnail-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: var(--text-muted);
    background: linear-gradient(135deg, rgba(30, 41, 59, 1), rgba(15, 23, 42, 1));
}

.preview-duration {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    gap: 6px;
}

.preview-duration i {
    color: var(--primary);
}

.preview-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.preview-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
    color: white;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.preview-meta-row {
    display: flex;
    gap: 20px;
}

.preview-meta-item {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 14px;
}

.meta-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 10px;
    text-transform: uppercase;
}

.meta-value.creator {
    display: flex;
    align-items: center;
    gap: 10px;
}

.creator-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--cyan));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: white;
}

.creator-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.creator-name {
    font-weight: 600;
    font-size: 14px;
    color: white;
}

.creator-handle {
    font-size: 12px;
    color: var(--text-muted);
}

.meta-value.date {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: white;
}

.meta-value.date i {
    color: var(--primary);
    font-size: 18px;
}

.preview-music {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    padding: 10px 18px;
    font-size: 13px;
    color: var(--text-primary);
    width: fit-content;
}

.preview-music i {
    color: var(--accent-pink);
    font-size: 16px;
}

.preview-stats {
    display: flex;
    gap: 16px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
}

.stat-item i {
    font-size: 16px;
    color: var(--text-muted);
}

.stat-item span {
    font-weight: 600;
    color: white;
}

.preview-download-section {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.preview-download-section .btn-download-link {
    flex: 1;
    min-width: 140px;
    justify-content: center;
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 12px;
}

.preview-download-section .btn-download-link.primary {
    background: linear-gradient(135deg, var(--primary), var(--accent-cyan));
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(6, 182, 212, 0.25);
}

.preview-download-section .btn-download-link.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(6, 182, 212, 0.35);
}

@media (max-width: 700px) {
    .preview-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .preview-thumbnail-wrap {
        max-height: 260px;
        aspect-ratio: 16/9;
    }

    .preview-meta-row {
        flex-direction: column;
        gap: 12px;
    }

    .preview-stats {
        flex-wrap: wrap;
        gap: 12px;
    }

    .video-preview-card {
        padding: 16px;
    }
}

/* === MOBILE DASHBOARD OVERHAUL (Small Screens) === */
@media (max-width: 600px) {

    /* 1. Global Container Fixes */
    .content-wrapper {
        padding: 16px !important;
        padding-bottom: 80px !important;
        /* Nav spacing */
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden;
    }

    /* 2. Grid Stacking - Force 1 Column */
    .tools-grid,
    .bento-grid,
    .pricing-cards,
    .ai-tools-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    /* 3. Hero Card Typography */
    .hero-card h2 {
        font-size: 24px !important;
        /* Smaller title */
        line-height: 1.3;
    }

    .hero-card p {
        font-size: 14px !important;
    }

    /* 4. Pro Tool Cards (Compact Row Layout) */
    .pro-tool-card {
        padding: 16px !important;
        min-height: auto;
        display: flex !important;
        flex-direction: row !important;
        /* Force side-by-side */
        align-items: center !important;
        /* Center vertically */
        text-align: left !important;
        gap: 16px !important;
    }

    .pro-tool-card .card-content {
        flex: 1;
        min-width: 0;
        /* Prevent flex overflow */
    }

    .pro-tool-card .card-content h4 {
        font-size: 15px !important;
        margin-bottom: 2px !important;
    }

    .pro-tool-card .card-content p {
        font-size: 13px !important;
        line-height: 1.3 !important;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        /* Limit to 2 lines */
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin: 0 !important;
    }

    .pro-tool-card .card-icon {
        width: 44px;
        height: 44px;
        font-size: 20px;
        margin-bottom: 0 !important;
        /* Remove bottom margin if any */
    }

    .pro-tool-card .card-arrow {
        display: none !important;
        /* Hide arrow on mobile to save space */
    }

    /* 5. Platform Cards (Download) */
    .platform-cards {
        gap: 10px !important;
        justify-content: flex-start;
    }

    .platform-card {
        min-width: 90px !important;
        padding: 12px 8px !important;
        flex: 1;
    }

    .platform-name {
        font-size: 11px !important;
    }

    /* 6. AI Command Center */
    .header-titling h2 {
        font-size: 22px !important;
    }

    .input-hero-wrapper {
        height: auto !important;
        padding: 12px !important;
        flex-direction: column;
        gap: 10px;
    }

    .input-icon {
        display: none;
        /* Save space */
    }

    .hero-input {
        width: 100%;
        text-align: center;
        padding: 4px 0;
    }

    .btn-hero-action {
        width: 100%;
        background: rgba(255, 255, 255, 0.05);
    }

    /* 7. Context Panel (Brand Config) - Stack on Mobile */
    .context-panel .context-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .context-panel .context-group {
        width: 100% !important;
        grid-column: span 1 !important;
    }

    .context-panel .context-group.full {
        grid-column: span 1 !important;
    }

    .context-group input,
    .context-group select,
    .context-group .custom-dropdown,
    .context-group .dropdown-trigger {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* Extra fix for context panel on tablets */
@media (max-width: 768px) {
    .context-grid {
        grid-template-columns: 1fr !important;
    }

    .context-group,
    .context-group.full {
        grid-column: span 1 !important;
        width: 100% !important;
    }
}

/* Keep old result styles for fallback */
.result-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.result-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
    flex-shrink: 0;
}

.result-info h4 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 4px;
    color: white;
    line-height: 1.3;
}

.result-author {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0 0 12px;
}

.result-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-download-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: white;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: 0.2s;
}

.btn-download-link:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-download-link.primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-download-link.primary:hover {
    filter: brightness(1.2);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Quick Stats */
.stat-box {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 4px 8px;
    /* Add breathing room */
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: rgba(255, 255, 255, 0.05);
}

.stat-val {
    font-size: 28px;
    font-weight: 800;
    color: white;
    line-height: 1;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* === TOOLS GRID (AI) === */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.tool-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 24px;
    border-radius: 20px;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 16px;
}

.tool-card:hover {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.05);
}

.card-content {
    flex: 1;
    min-width: 0;
}

.card-content h4 {
    font-size: 16px;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
}

.card-content p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

.tool-color-1 {
    background: rgba(37, 99, 235, 0.1);
    /* Blue */
    color: var(--primary);
}

.tool-color-2 {
    background: rgba(71, 85, 105, 0.1);
    /* Slate */
    color: #94a3b8;
}

.tool-color-3 {
    background: rgba(14, 165, 233, 0.1);
    /* Sky */
    color: var(--cyan);
}

/* === MODERN TABLE === */
.table-container {
    background: var(--glass-bg);
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    overflow: hidden;
    margin-top: 40px;
}

.table-header {
    padding: 24px;
    border-bottom: 1px solid var(--glass-border);
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
}

.modern-table th {
    text-align: left;
    padding: 16px 24px;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 13px;
    text-transform: uppercase;
}

.modern-table td {
    padding: 20px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: white;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
}

.status-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

/* === RESPONSIVE === */
/* === RESPONSIVE & MOBILE === */
@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }

    .span-2,
    .span-3 {
        grid-column: span 1;
    }

    .studio-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }

    /* Mobile Header Adjustments */
    .top-bar {
        padding: 15px 20px;
    }

    .page-title h1 {
        font-size: 20px;
    }

    .content-wrapper {
        padding: 20px;
        padding-bottom: 100px;
        /* Space for Bottom Nav */
    }

    /* Mobile Bottom Nav */
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(15, 23, 42, 0.95);
        backdrop-filter: blur(20px);
        border-top: 1px solid var(--glass-border);
        padding: 12px 20px;
        justify-content: space-around;
        z-index: 1000;
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
    }

    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        color: var(--text-muted);
        text-decoration: none;
        background: none;
        border: none;
        font-size: 11px;
        font-weight: 500;
        cursor: pointer;
    }

    .mobile-nav-item i {
        font-size: 24px;
        margin-bottom: 2px;
        transition: 0.2s;
    }

    .mobile-nav-item.active {
        color: var(--primary);
    }

    .mobile-nav-item.active i {
        transform: translateY(-4px);
        text-shadow: 0 0 15px var(--primary-glow);
    }
}

@media (min-width: 1025px) {
    .mobile-bottom-nav {
        display: none;
    }
}


/* === UTILS === */
.hidden {
    display: none !important;
}

.glow-text {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Input Modern form styles */
.input-modern-xl {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    padding: 16px;
    border-radius: 12px;
    color: white;
    font-family: inherit;
    font-size: 15px;
    transition: 0.3s;
}

.input-modern-xl:focus {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

.btn-primary-xl {
    width: 100%;
    background: var(--grad-aurora);
    border: none;
    padding: 16px;
    border-radius: 12px;
    color: white;
    font-weight: 700;
    cursor: pointer;
    font-size: 16px;
    margin-top: 16px;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

/* === LOADING SPINNER === */
.spinner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.loader {
    width: 48px;
    height: 48px;
    border: 5px solid #FFF;
    border-bottom-color: var(--primary);
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* === CINEMATIC MODAL (Fixed) === */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-backdrop.active {
    display: flex;
    opacity: 1;
}

.modal-window {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(59, 130, 246, 0.2);
    border-radius: 24px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-backdrop.active .modal-window {
    transform: scale(1);
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    background: linear-gradient(90deg, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.btn-close {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.btn-close:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Preview Content Grid */
.preview-splitscreen {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
    padding: 30px;
}

@media (max-width: 768px) {
    .preview-splitscreen {
        grid-template-columns: 1fr;
    }
}

/* Left: Hero Thumb */
.preview-hero-thumb {
    width: 100%;
    aspect-ratio: 9/16;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.preview-hero-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-icon-glass {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

/* Right: Info */
.video-title-mega {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.author-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    padding: 10px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.author-avatar-lg {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
}

.author-avatar-lg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-info h5 {
    font-size: 16px;
    margin: 0;
    color: white;
}

.author-info span {
    font-size: 13px;
    color: var(--text-muted);
}

.audio-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 14px;
    background: rgba(0, 0, 0, 0.2);
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 30px;
}

.stat-glass {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 10px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

.stat-glass strong {
    display: block;
    font-size: 16px;
    color: white;
    margin-top: 4px;
}

/* Mega Actions */
.btn-download-mega {
    width: 100%;
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    padding: 16px;
    border-radius: 12px;
    color: white;
    font-weight: 800;
    font-size: 18px;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
    transition: 0.3s;
}

.btn-download-mega:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(16, 185, 129, 0.5);
}

.btn-download-sub {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.btn-download-sub:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* === BILLING SECTION === */
#view-billing {
    padding: 20px 0;
}

.billing-header {
    margin-bottom: 24px;
}

.current-balance {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(59, 130, 246, 0.1));
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 16px;
}

.balance-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.balance-label {
    font-size: 13px;
    color: var(--text-muted);
}

.balance-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--cyan);
}

.btn-recharge-lg {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background: var(--grad-aurora);
    border-radius: 12px;
    color: white;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-recharge-lg:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--primary-glow);
}

/* Pricing Cards Grid */
.pricing-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.price-card {
    position: relative;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 24px;
    transition: all 0.3s;
}

.price-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.price-card .badge {
    position: absolute;
    top: -10px;
    right: 16px;
    padding: 6px 14px;
    background: var(--cyan);
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.price-card .badge.gold {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #1a1a2e;
}

.price-card.popular {
    border-color: var(--cyan);
    background: linear-gradient(180deg, rgba(6, 182, 212, 0.1), transparent);
}

.price-card.max {
    border-color: #f59e0b;
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.1), transparent);
}

.price-tier {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.price-amount {
    font-size: 28px;
    font-weight: 800;
    color: white;
    margin-bottom: 20px;
}

.price-amount span {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
}

.price-features {
    list-style: none;
    margin-bottom: 24px;
}

.price-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 13px;
    color: var(--text-muted);
}

.price-features li i {
    color: var(--success);
    font-size: 16px;
}

.price-card .btn-buy {
    display: block;
    text-align: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: white;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.price-card .btn-buy:hover {
    background: rgba(255, 255, 255, 0.15);
}

.price-card .btn-buy.popular {
    background: var(--grad-aurora);
    border: none;
}

.price-card .btn-buy.gold {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #1a1a2e;
    border: none;
}

/* Billing History */
.billing-history {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    transition: background 0.2s;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.history-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.history-icon.pending {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.history-info {
    flex: 1;
}

.history-title {
    font-weight: 600;
    font-size: 14px;
}

.history-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.history-amount {
    font-weight: 700;
    color: var(--success);
}

/* Responsive */
@media (max-width: 1200px) {
    .pricing-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .pricing-cards {
        grid-template-columns: 1fr;
    }

    .current-balance {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .btn-recharge-lg {
        width: 100%;
        justify-content: center;
    }
}

/* AI Command Center (Pro Max) */
.ai-command-center {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    animation: fadeIn 0.5s ease-out;
}

.command-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.header-titling h2 {
    font-size: 28px;
    /* Larger */
    font-weight: 800;
    /* Bolder */
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
    /* Fallback */
    background: linear-gradient(to right, #ffffff, #e2e8f0);
    /* Brighter gradient */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    /* improved legibility */
}

.header-titling p {
    color: #cbd5e1;
    /* Brighter than muted */
    font-size: 15px;
    margin-top: 6px;
    font-weight: 500;
}

.credit-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #fbbf24;
}

/* Input Hero */
.input-hero-container {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 8px;
    margin-bottom: 24px;
    backdrop-filter: blur(12px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.input-hero-wrapper {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 18px;
    padding: 6px 16px;
    height: 64px;
    border: 1px solid transparent;
    transition: all 0.3s;
}

.input-hero-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.input-icon {
    font-size: 24px;
    color: var(--text-muted);
    margin-right: 16px;
}

.hero-input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    font-size: 16px;
    font-weight: 500;
    outline: none;
}

.hero-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    /* Brighter placeholder */
}

.btn-hero-action {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s;
}

.btn-hero-action:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.context-toggle-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 4px;
}

.btn-context-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-context-trigger:hover {
    color: white;
}

.context-status {
    font-size: 11px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-muted);
}

/* Context Panel */
.context-panel {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    animation: slideDown 0.3s ease-out;
}

.context-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.context-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.context-group.full {
    grid-column: span 2;
}

.context-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-left: 4px;
}

.context-group input,
.context-group select {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px 14px;
    color: white;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}

.context-group input:focus,
.context-group select:focus {
    border-color: var(--primary);
}

/* Tool Dock */
.tool-dock-container {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
    align-items: stretch;
}

.tool-dock {
    flex: 1;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(16px);
    border-radius: 20px;
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: space-around;
}

.dock-item {
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 10px;
    width: 100%;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.2s;
    position: relative;
    opacity: 0.7;
    /* Increased from 0.6 */
}

.dock-item:hover {
    background: rgba(255, 255, 255, 0.08);
    /* More visible hover */
    opacity: 1;
}

.dock-item.active {
    background: rgba(255, 255, 255, 0.12);
    /* Brighter active state */
    opacity: 1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.dock-item .icon-box {
    font-size: 26px;
    /* Slightly larger */
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.2));
    /* Glow effect */
    transition: transform 0.2s;
}

.dock-item .label {
    font-size: 12px;
    font-weight: 600;
    color: #e2e8f0;
    /* Brighter text */
    letter-spacing: 0.3px;
}

.icon-box.blue {
    color: #3b82f6;
}

.icon-box.purple {
    color: #8b5cf6;
}

.icon-box.pink {
    color: #ec4899;
}

.icon-box.green {
    color: #10b981;
}

.dock-divider {
    width: 1px;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
}

.btn-execute-primary {
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    border: none;
    border-radius: 20px;
    padding: 0 32px;
    color: white;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-execute-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

/* Result Console */
.result-console {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    min-height: 400px;
    padding: 30px;
}

.empty-placeholder {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-muted);
}

.placeholder-icon {
    font-size: 64px;
    margin-bottom: 24px;
    color: rgba(255, 255, 255, 0.1);
}

/* Common Helpers */
.hidden {
    display: none !important;
}

@media (max-width: 768px) {
    .tool-dock-container {
        flex-direction: column;
        gap: 20px;
    }

    .context-grid {
        grid-template-columns: 1fr;
    }

    .command-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .header-titling h2 {
        font-size: 20px;
        gap: 8px;
    }

    .header-titling p {
        font-size: 13px;
    }

    .btn-execute-primary {
        width: 100%;
        height: 56px;
        justify-content: center;
        font-size: 18px;
        border-radius: 16px;
    }

    .top-bar {
        padding: 15px 20px;
    }

    .page-title h1 {
        font-size: 18px;
    }

    .credits-pill {
        padding: 6px 12px;
        font-size: 12px;
    }

    .sidebar {
        display: none;
        /* Assuming we have a mobile menu or sidebar is hidden by default on mobile */
    }

    .studio-layout {
        grid-template-columns: 1fr;
    }

    /* Tool Dock Mobile Fixes - Show All Items */
    .tool-dock {
        padding: 8px;
        gap: 6px;
        border-radius: 16px;
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        /* Show all 5 tools in one row */
        overflow: visible;
    }

    .dock-item {
        padding: 8px 4px;
        min-width: auto;
        flex: none;
    }

    .dock-item .icon-box {
        font-size: 20px;
    }

    .dock-item .label {
        font-size: 9px;
        white-space: nowrap;
        text-align: center;
        line-height: 1.2;
    }

    .dock-divider {
        display: none;
        /* Hide divider on mobile to save space */
    }
}

/* Pro Tool Cards (Legacy Grid Replacement) */
.pro-tool-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.pro-tool-card:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.pro-tool-card .card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.pro-tool-card .card-icon.gradient-blue {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(37, 99, 235, 0.1));
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.pro-tool-card .card-icon.gradient-purple {
    background: linear-gradient(135deg, #475569, #64748b);
    /* Slate gradient */
}

.pro-tool-card .card-icon.gradient-pink {
    background: linear-gradient(135deg, #0ea5e9, #06b6d4);
    /* Sky Blue gradient */
}

.pro-tool-card .card-icon.gradient-green {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.1));
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.pro-tool-card .card-content {
    flex: 1;
}

.pro-tool-card .card-content h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #f8fafc;
}

.pro-tool-card .card-content p {
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.4;
    margin: 0;
}

.pro-tool-card .card-arrow {
    color: rgba(255, 255, 255, 0.2);
    font-size: 20px;
    transition: all 0.2s;
}

.pro-tool-card:hover .card-arrow {
    color: var(--primary);
    transform: translateX(4px);
}


/* Custom Dropdown UI */
.custom-dropdown {
    position: relative;
    width: 100%;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.dropdown-trigger {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-main);
    font-size: 14px;
}

.dropdown-trigger:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.05);
}

.dropdown-trigger i {
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.custom-dropdown.open .dropdown-trigger {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.custom-dropdown.open .dropdown-trigger i {
    transform: rotate(180deg);
    color: var(--primary);
}

.dropdown-options {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    margin-top: 8px;
    background: #0f172a;
    /* Solid background backup */
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px;
    z-index: 9999;
    /* Higher z-index */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    max-height: 250px;
    overflow-y: auto;
    pointer-events: none;
    /* Prevent clicks when hidden */
}

.custom-dropdown.open .dropdown-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.custom-dropdown.open .dropdown-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    transition: all 0.2s ease;
    font-size: 14px;
}

.dropdown-item i {
    font-size: 16px;
    opacity: 0.7;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding-left: 16px;
}

.dropdown-item.active {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.2), transparent);
    color: var(--primary);
    border-left: 2px solid var(--primary);
}

.dropdown-item.active i {
    color: var(--primary);
    opacity: 1;
}

.dropdown-options::-webkit-scrollbar {
    width: 6px;
}

.dropdown-options::-webkit-scrollbar-track {
    background: transparent;
}

.dropdown-options::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

/* Primary XL Button for Feature Views */
.btn-primary-xl {
    background: var(--grad-aurora);
    /* Default gradient */
    color: white;
    border: none;
    height: 56px;
    padding: 0 40px;
    border-radius: 16px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.25);
    position: relative;
    overflow: hidden;
    min-width: 240px;
}

.btn-primary-xl:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(6, 182, 212, 0.4);
    filter: brightness(1.1);
}

.btn-primary-xl:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(6, 182, 212, 0.2);
}

.btn-primary-xl i {
    font-size: 20px;
}

/* EXTRACT SCRIPT DOCK ICON STYLE */
.icon-box.cyan {
    background: rgba(6, 182, 212, 0.1);
    color: var(--cyan);
    border-color: rgba(6, 182, 212, 0.2);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 12px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}