/* ============================================================
   Facereels AI Studio v2 — Style.css (SAP2D Edition)
   ============================================================ */

/* --- Variables / Tokens (SAP2D Style Architecture) --- */
:root {
   /* Deep Obsidian Cyber Palette */
   --bg: #0d1117;
   --bg2: #141b26;
   --bg3: #1c2436;
   --bg4: #222d40;
   
   --bg-dark: #0d1117;
   --bg-panel: rgba(20, 27, 38, 0.88);
   --bg-elevated: #1c2436;
   --bg-hover: rgba(78, 140, 255, 0.08);
   
   /* Tech Borders & Highlights */
   --bdr: rgba(70, 110, 200, 0.18);
   --border: rgba(70, 110, 200, 0.18);
   --border-hover: rgba(78, 140, 255, 0.45);
   --glass-border: rgba(70, 110, 200, 0.22);
   --glass: rgba(28, 36, 54, 0.65);
   
   /* Vibrant Accent Palette (Electric Blue, Cyber Violet, Emerald) */
   --acc: #4e8cff;
   --accent: #4e8cff;
   --accent-2: #a855f7;
   --pur: #a855f7;
   --accent-green: #3dd68c;
   --grn: #3dd68c;
   --accent-cyan: #38bdf8;
   --accent-amber: #ffb347;
   --amb: #ffb347;
   --accent-red: #ff6b6b;
   --red: #ff6b6b;
   
   /* Crisp High-Contrast Typography */
   --text: #dde4f0;
   --txt: #dde4f0;
   --text-muted: #6b7fa8;
   --txt2: #6b7fa8;
   --text-dim: #9fb2d8;
   --txt3: #3d4f6e;
   
   --radius: 12px;
   --radius-sm: 8px;
   --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
   --sidebar-width: 240px;
   --font: 'Outfit', sans-serif;
   --mono: 'JetBrains Mono', monospace;
   --ui: 'Outfit', sans-serif;
}

[data-theme="light"] {
   --bg-dark: #f8fafc;
   --bg-panel: rgba(255, 255, 255, 0.9);
   --bg-hover: rgba(78, 140, 255, 0.08);
   --border: rgba(70, 110, 200, 0.2);
   --text: #0f172a;
   --text-muted: #475569;
   --text-dim: #334155;
   --glass: rgba(0, 0, 0, 0.03);
   --glass-border: rgba(0, 0, 0, 0.1);
   --shadow: 0 4px 32px rgba(0, 0, 0, 0.08);
}

[data-theme="midnight"] {
   --bg-dark: #07090e;
   --bg-panel: rgba(13, 17, 23, 0.92);
   --bg-hover: rgba(78, 140, 255, 0.06);
   --border: rgba(70, 110, 200, 0.14);
   --accent: #3b82f6;
   --accent-2: #8b5cf6;
   --text: #f8fafc;
   --text-muted: #6b7fa8;
   --text-dim: #cbd5e1;
}

/* --- Reset --- */
*,
*::before,
*::after {
   box-sizing: border-box;
   margin: 0;
   padding: 0;
}

body {
   font-family: var(--ui);
   background: var(--bg);
   color: var(--txt);
   overflow-x: hidden;
   min-height: 100vh;
   -webkit-font-smoothing: antialiased;
   letter-spacing: -0.01em;
}

input,
select,
textarea,
button {
   font-family: var(--ui);
}

code, kbd, pre, .mono-val {
   font-family: var(--mono);
}

/* --- Background Blobs (Sleek ambient illumination) --- */
.blob {
   position: fixed;
   border-radius: 50%;
   filter: blur(140px);
   pointer-events: none;
   z-index: 0;
   opacity: 0.18;
}

.blob-1 {
   width: 550px;
   height: 550px;
   background: radial-gradient(circle, #4e8cff, transparent);
   top: -120px;
   left: -120px;
}

.blob-2 {
   width: 500px;
   height: 500px;
   background: radial-gradient(circle, #a855f7, transparent);
   bottom: -100px;
   right: -100px;
}

.blob-3 {
   width: 350px;
   height: 350px;
   background: radial-gradient(circle, #38bdf8, transparent);
   top: 45%;
   left: 40%;
}

/* --- Layout --- */
.app-container {
   display: flex;
   min-height: 100vh;
   position: relative;
   z-index: 1;
}

/* --- Sidebar (SAP2D Style) --- */
.sidebar {
   width: var(--sidebar-width);
   background: var(--bg2);
   backdrop-filter: blur(20px);
   -webkit-backdrop-filter: blur(20px);
   border-right: 1px solid var(--bdr);
   display: flex;
   flex-direction: column;
   padding: 1.25rem 0.9rem;
   gap: 1.1rem;
   position: fixed;
   left: 0;
   top: 0;
   bottom: 0;
   z-index: 100;
   transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
   box-shadow: 2px 0 20px rgba(0, 0, 0, 0.4);
}

.logo {
   display: flex;
   align-items: center;
   gap: 0.6rem;
   padding: 0 0.4rem;
}

.logo h2 {
   font-family: 'Space Grotesk', var(--ui);
   font-size: 1.25rem;
   font-weight: 700;
   background: linear-gradient(135deg, #4e8cff 0%, #a855f7 100%);
   -webkit-background-clip: text;
   -webkit-text-fill-color: transparent;
   letter-spacing: -0.02em;
}

.logo-icon {
   font-size: 1.3rem;
   color: var(--acc);
   filter: drop-shadow(0 0 10px rgba(78, 140, 255, 0.6));
}

.server-status {
   display: flex;
   align-items: center;
   gap: 0.5rem;
   font-size: 0.72rem;
   font-family: var(--mono);
   color: var(--txt2);
   padding: 0.45rem 0.7rem;
   background: var(--bg3);
   border-radius: var(--radius-sm);
   border: 1px solid var(--bdr);
}

.status-dot {
   width: 7px;
   height: 7px;
   border-radius: 50%;
   background: var(--txt2);
}

.status-dot.online {
   background: var(--grn);
   box-shadow: 0 0 8px var(--grn);
}

.status-dot.offline {
   background: var(--red);
   box-shadow: 0 0 8px var(--red);
}

/* PWA Install Button (SAP2D High-Tech Style) */
#pwa-install-btn, .pwa-install-btn {
   background: linear-gradient(135deg, rgba(78, 140, 255, 0.18), rgba(168, 85, 247, 0.18)) !important;
   border: 1px solid rgba(78, 140, 255, 0.4) !important;
   color: #ffffff !important;
   padding: 0.6rem 0.85rem !important;
   border-radius: var(--radius-sm) !important;
   font-size: 0.82rem !important;
   font-weight: 600 !important;
   cursor: pointer !important;
   display: flex !important;
   align-items: center !important;
   justify-content: center !important;
   gap: 0.5rem !important;
   box-shadow: 0 4px 14px rgba(78, 140, 255, 0.25) !important;
   transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

#pwa-install-btn:hover, .pwa-install-btn:hover {
   background: linear-gradient(135deg, rgba(78, 140, 255, 0.35), rgba(168, 85, 247, 0.35)) !important;
   border-color: var(--acc) !important;
   transform: translateY(-1px);
   box-shadow: 0 6px 20px rgba(78, 140, 255, 0.4) !important;
}

.nav-links {
   list-style: none;
   display: flex;
   flex-direction: column;
   gap: 0.25rem;
   flex: 1;
}

.nav-links li a {
   display: flex;
   align-items: center;
   gap: 0.7rem;
   padding: 0.65rem 0.85rem;
   border-radius: var(--radius-sm);
   color: var(--txt2);
   text-decoration: none;
   font-size: 0.86rem;
   font-weight: 500;
   border: 1px solid transparent;
   transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
   position: relative;
}

.nav-links li a:hover {
   background: var(--bg3);
   color: var(--txt);
   border-color: var(--bdr);
}

.nav-links li.active a {
   background: linear-gradient(135deg, rgba(78, 140, 255, 0.18), rgba(168, 85, 247, 0.12));
   color: #ffffff;
   border: 1px solid rgba(78, 140, 255, 0.4);
   box-shadow: 0 2px 10px rgba(78, 140, 255, 0.15);
}

.badge {
   background: var(--acc);
   color: white;
   border-radius: 99px;
   padding: 1px 7px;
   font-size: 0.68rem;
   font-family: var(--mono);
   font-weight: 600;
}

.badge-warning {
   background: var(--accent-amber);
   color: #1a1a1a;
}

.badge-success {
   background: var(--accent-green);
   color: #1a1a1a;
}

.badge-pulse {
   background: rgba(16, 217, 160, 0.2);
   color: var(--accent-green);
   animation: pulse-badge 2s infinite;
   border: 1px solid rgba(16, 217, 160, 0.3);
   font-size: 0.6rem;
}

@keyframes pulse-badge {

   0%,
   100% {
      opacity: 1
   }

   50% {
      opacity: 0.5
   }
}

.user-profile {
   display: flex;
   align-items: center;
   gap: 0.6rem;
   border-top: 1px solid var(--border);
   padding-top: 1rem;
   cursor: pointer;
   transition: background 0.2s;
   padding: 0.8rem;
   margin: 0 -0.8rem;
   border-radius: var(--radius-sm);
}

.user-profile:hover {
   background: var(--bg-hover);
}

.avatar {
   width: 36px;
   height: 36px;
   border-radius: 50%;
   border: 2px solid var(--accent);
}

.user-info {
   display: flex;
   flex-direction: column;
}

.user-info .name {
   font-size: 0.82rem;
   font-weight: 600;
}

.user-info .plan {
   font-size: 0.7rem;
   color: var(--accent-2);
}

/* --- Main --- */
.workspace {
   flex: 1;
   margin-left: var(--sidebar-width);
   display: flex;
   flex-direction: column;
   min-height: 100vh;
}

/* --- Topbar --- */
.top-bar {
   display: flex;
   justify-content: space-between;
   align-items: center;
   padding: 1rem 1.5rem;
   border-bottom: 1px solid var(--border);
   background: var(--bg-panel);
   backdrop-filter: blur(10px);
   position: sticky;
   top: 0;
   z-index: 50;
}

.breadcrumbs {
   display: flex;
   align-items: center;
   gap: 0.4rem;
   font-size: 0.85rem;
   color: var(--text-muted);
}

.breadcrumbs .current {
   color: var(--text);
   font-weight: 600;
}

.separator {
   font-size: 0.6rem;
}

/* --- Tab Content --- */
.tab-content {
   display: none;
   padding: 1.5rem;
   animation: fadeIn 0.3s ease;
   flex: 1;
}

.tab-content.active {
   display: block;
}

@keyframes fadeIn {
   from {
      opacity: 0;
      transform: translateY(8px)
   }

   to {
      opacity: 1;
      transform: none
   }
}

/* --- Glass Panel (SAP2D Style) --- */
.glass-panel {
   background: var(--bg2);
   backdrop-filter: blur(20px);
   -webkit-backdrop-filter: blur(20px);
   border: 1px solid var(--bdr);
   border-radius: var(--radius);
   box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

/* --- Grid --- */
.grid-content {
   display: grid;
   grid-template-columns: 1fr 1fr;
   gap: 1.25rem;
}

@media (max-width: 900px) {
   .grid-content {
      grid-template-columns: 1fr;
   }
}

/* --- Config Panel --- */
.config-panel {
   padding: 1.25rem;
}

.config-panel h3 {
   font-size: 1rem;
   font-weight: 700;
   margin-bottom: 1.1rem;
   display: flex;
   align-items: center;
   gap: 0.5rem;
   color: #ffffff;
   letter-spacing: -0.01em;
}

.config-panel h3 i {
   color: var(--acc);
}

/* --- Forms (SAP2D Input Architecture) --- */
.form-group {
   display: flex;
   flex-direction: column;
   gap: 0.35rem;
}

.form-group label {
   font-size: 0.76rem;
   font-weight: 600;
   color: var(--txt2);
   letter-spacing: 0.01em;
}

.settings-row {
   display: grid;
   grid-template-columns: 1fr 1fr;
   gap: 0.85rem;
   margin-bottom: 0.85rem;
}

.form-group.half {
   grid-column: span 1;
}

.form-group.third {
   flex: 1;
}

.settings-row.three {
   grid-template-columns: 1fr 1fr 1fr;
}

textarea,
.glass-input {
   background: var(--bg3);
   border: 1px solid var(--bdr);
   border-radius: var(--radius-sm);
   color: var(--txt);
   padding: 0.55rem 0.8rem;
   font-size: 0.85rem;
   font-family: var(--ui);
   transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
   width: 100%;
   resize: vertical;
   outline: none;
}

textarea:focus,
.glass-input:focus {
   border-color: var(--acc);
   box-shadow: 0 0 0 2px rgba(78, 140, 255, 0.25);
   background: var(--bg4);
}

select.glass-input {
   appearance: none;
   cursor: pointer;
}

.select-wrapper {
   position: relative;
}

.select-wrapper::after {
   content: '▾';
   position: absolute;
   right: 0.75rem;
   top: 50%;
   transform: translateY(-50%);
   pointer-events: none;
   color: var(--txt2);
   font-size: 0.85rem;
}

.select-wrapper select {
   width: 100%;
   background: var(--bg3);
   border: 1px solid var(--bdr);
   border-radius: var(--radius-sm);
   color: var(--txt);
   padding: 0.55rem 2rem 0.55rem 0.8rem;
   font-size: 0.85rem;
   cursor: pointer;
   appearance: none;
   outline: none;
   transition: all 0.15s;
}

.select-wrapper select:focus {
   border-color: var(--acc);
   box-shadow: 0 0 0 2px rgba(78, 140, 255, 0.25);
   background: var(--bg4);
}

.select-wrapper select option {
   background: var(--bg2);
   color: var(--txt);
}

.hint {
   font-size: 0.7rem;
   color: var(--txt2);
}

.prompt-hint {
   font-size: 0.72rem;
   color: var(--txt2);
   margin-bottom: 0.3rem;
}

.prompt-hint code {
   background: rgba(78, 140, 255, 0.15);
   border: 1px solid rgba(78, 140, 255, 0.25);
   border-radius: 4px;
   padding: 1px 5px;
   color: var(--acc);
   font-family: var(--mono);
}

.prompt-textarea {
   font-size: 0.82rem;
   line-height: 1.5;
   min-height: 95px;
   font-family: var(--ui);
}

/* --- Sliders (SAP2D Style) --- */
.slider-input {
   -webkit-appearance: none;
   width: 100%;
   height: 4px;
   border-radius: 99px;
   background: var(--bg4);
   outline: none;
   cursor: pointer;
}

.slider-input::-webkit-slider-thumb {
   -webkit-appearance: none;
   appearance: none;
   width: 15px;
   height: 15px;
   border-radius: 50%;
   background: var(--acc);
   cursor: pointer;
   box-shadow: 0 0 8px rgba(78, 140, 255, 0.7);
   border: 2px solid #ffffff;
   transition: transform 0.1s;
}

.slider-input::-webkit-slider-thumb:hover {
   transform: scale(1.15);
}

.slider-input::-moz-range-thumb {
   width: 15px;
   height: 15px;
   border-radius: 50%;
   background: var(--acc);
   cursor: pointer;
   border: 2px solid #ffffff;
   box-shadow: 0 0 8px rgba(78, 140, 255, 0.7);
}

/* --- Color Picker --- */
.color-picker {
   width: 44px;
   height: 34px;
   border: 1px solid var(--bdr);
   border-radius: var(--radius-sm);
   cursor: pointer;
   padding: 2px;
   background: var(--bg3);
}

.color-text-row {
   display: flex;
   gap: 0.5rem;
   align-items: center;
}

.color-text-row .glass-input {
   flex: 1;
}

/* --- Toggle Switches --- */
.toggle-grid {
   display: grid;
   grid-template-columns: 1fr 1fr;
   gap: 0.65rem;
   margin: 0.85rem 0;
}

.toggle-item {
   display: flex;
   align-items: center;
   justify-content: space-between;
   background: var(--bg3);
   border: 1px solid var(--bdr);
   border-radius: var(--radius-sm);
   padding: 0.45rem 0.7rem;
   transition: border-color 0.15s;
}

.toggle-item:hover {
   border-color: rgba(78, 140, 255, 0.35);
}

.toggle-label {
   font-size: 0.76rem;
   color: var(--txt);
   font-weight: 500;
}

.toggle-switch {
   position: relative;
   display: inline-block;
   width: 36px;
   height: 18px;
}

.toggle-switch input {
   opacity: 0;
   width: 0;
   height: 0;
}

.toggle-slider {
   position: absolute;
   cursor: pointer;
   top: 0;
   left: 0;
   right: 0;
   bottom: 0;
   background: var(--bg4);
   border: 1px solid var(--bdr);
   transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
   border-radius: 99px;
}

.toggle-slider:before {
   position: absolute;
   content: "";
   height: 12px;
   width: 12px;
   left: 2px;
   bottom: 2px;
   background: #ffffff;
   transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
   border-radius: 50%;
}

input:checked+.toggle-slider {
   background: var(--acc);
   border-color: var(--acc);
   box-shadow: 0 0 10px rgba(78, 140, 255, 0.4);
}

input:checked+.toggle-slider:before {
   transform: translateX(18px);
}

/* --- Buttons (SAP2D Aesthetics) --- */
.btn-primary {
   background: linear-gradient(135deg, #4e8cff 0%, #a855f7 100%);
   color: #ffffff;
   border: 1px solid rgba(168, 85, 247, 0.35);
   border-radius: var(--radius-sm);
   padding: 0.6rem 1.25rem;
   font-size: 0.86rem;
   font-weight: 600;
   cursor: pointer;
   display: inline-flex;
   align-items: center;
   gap: 0.5rem;
   transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
   box-shadow: 0 4px 16px rgba(78, 140, 255, 0.3);
}

.btn-primary:hover:not(:disabled) {
   transform: translateY(-1px);
   box-shadow: 0 6px 22px rgba(78, 140, 255, 0.45);
   border-color: #a855f7;
}

.btn-primary:disabled {
   opacity: 0.5;
   cursor: not-allowed;
}

/* Cancel Generation Button */
.btn-cancel-gen {
   background: linear-gradient(135deg, #ff6b6b, #e11d48);
   color: white;
   border: 1px solid rgba(255, 107, 107, 0.4);
   border-radius: var(--radius-sm);
   padding: 0.6rem 1.25rem;
   font-size: 0.86rem;
   font-weight: 600;
   cursor: pointer;
   display: inline-flex;
   align-items: center;
   gap: 0.5rem;
   transition: all 0.2s;
   animation: cancel-pulse 2s ease-in-out infinite;
}

.btn-cancel-gen:hover {
   transform: translateY(-1px);
   box-shadow: 0 4px 20px rgba(255, 107, 107, 0.5);
}

@keyframes cancel-pulse {
   0%, 100% {
      box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.4);
   }
   50% {
      box-shadow: 0 0 0 6px rgba(255, 107, 107, 0);
   }
}

.btn-secondary {
   background: var(--bg3);
   color: var(--txt);
   border: 1px solid var(--bdr);
   border-radius: var(--radius-sm);
   padding: 0.55rem 1.1rem;
   font-size: 0.84rem;
   cursor: pointer;
   display: inline-flex;
   align-items: center;
   gap: 0.5rem;
   transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
   text-decoration: none;
}

.btn-secondary:hover {
   background: var(--bg4);
   border-color: var(--border-hover);
   color: #ffffff;
}

.btn-ghost {
   background: transparent;
   border: 1px solid transparent;
   color: var(--txt2);
   border-radius: var(--radius-sm);
   padding: 0.45rem 0.75rem;
   font-size: 0.8rem;
   cursor: pointer;
   display: inline-flex;
   align-items: center;
   gap: 0.4rem;
   transition: all 0.15s;
}

.btn-ghost:hover {
   background: var(--bg3);
   color: var(--txt);
   border-color: var(--bdr);
}

.btn-sm {
   padding: 0.35rem 0.7rem;
   font-size: 0.76rem;
}

.btn-generate {
   width: 100%;
   padding: 0.85rem;
   background: linear-gradient(135deg, #4e8cff 0%, #a855f7 100%);
   color: white;
   border: 1px solid rgba(78, 140, 255, 0.4);
   border-radius: var(--radius-sm);
   font-size: 0.95rem;
   font-weight: 700;
   cursor: pointer;
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 0.6rem;
   margin-top: 0.9rem;
   transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
   box-shadow: 0 4px 20px rgba(78, 140, 255, 0.35);
}

.btn-generate:hover:not(:disabled) {
   transform: translateY(-2px);
   box-shadow: 0 8px 30px rgba(78, 140, 255, 0.55);
   border-color: #a855f7;
}

.btn-generate:disabled {
   opacity: 0.5;
   cursor: not-allowed;
}

.icon-btn {
   background: var(--bg3);
   border: 1px solid var(--bdr);
   color: var(--txt2);
   cursor: pointer;
   padding: 0.45rem;
   border-radius: var(--radius-sm);
   transition: all 0.15s;
   font-size: 0.9rem;
   display: inline-flex;
   align-items: center;
   justify-content: center;
}

.icon-btn:hover {
   background: var(--bg4);
   color: var(--txt);
   border-color: var(--acc);
}

.upload-btn {
   cursor: pointer;
}

/* --- Input icon wrapper --- */
.input-icon-wrapper {
   position: relative;
}

.input-icon-wrapper .glass-input {
   padding-right: 2.5rem;
}

.toggle-visibility {
   position: absolute;
   right: 0.5rem;
   top: 50%;
   transform: translateY(-50%);
   background: none;
   border: none;
   color: var(--text-muted);
   cursor: pointer;
   padding: 0.25rem;
}

/* --- Preview Panel --- */
.preview-panel {
   display: flex;
   flex-direction: column;
   gap: 1rem;
}

.video-preview-container {
   aspect-ratio: 9/16;
   max-height: 420px;
   overflow: hidden;
   display: flex;
   align-items: center;
   justify-content: center;
   position: relative;
}

.video-placeholder {
   text-align: center;
   padding: 2rem;
   display: flex;
   flex-direction: column;
   align-items: center;
   gap: 1rem;
}

.placeholder-animation {
   position: relative;
   display: flex;
   align-items: center;
   justify-content: center;
}

.placeholder-icon {
   font-size: 3rem;
   color: var(--accent-2);
   position: relative;
   z-index: 1;
}

.placeholder-rings {
   position: absolute;
}

.ring {
   border: 2px solid;
   border-radius: 50%;
   position: absolute;
   top: 50%;
   left: 50%;
   transform: translate(-50%, -50%);
   animation: ring-pulse 2s infinite;
}

.ring-1 {
   width: 80px;
   height: 80px;
   border-color: rgba(168, 85, 247, 0.4);
   animation-delay: 0s;
}

.ring-2 {
   width: 110px;
   height: 110px;
   border-color: rgba(168, 85, 247, 0.25);
   animation-delay: 0.4s;
}

.ring-3 {
   width: 140px;
   height: 140px;
   border-color: rgba(168, 85, 247, 0.1);
   animation-delay: 0.8s;
}

@keyframes ring-pulse {

   0%,
   100% {
      transform: translate(-50%, -50%) scale(1);
      opacity: 1
   }

   50% {
      transform: translate(-50%, -50%) scale(1.08);
      opacity: 0.5
   }
}

.sub-hint {
   font-size: 0.78rem;
   color: var(--text-muted);
}

#final-video {
   width: 100%;
   height: 100%;
   object-fit: contain;
   border-radius: var(--radius);
}

.editor-preview-container {
   aspect-ratio: 9/16;
   max-height: 600px;
   display: flex;
   align-items: center;
   justify-content: center;
   position: relative;
   background: #000;
   border-radius: var(--radius);
   overflow: hidden;
}

.editor-preview-container video {
   width: 100%;
   height: 100%;
   object-fit: contain;
   position: absolute;
   inset: 0;
}

.editor-preview-container canvas {
   width: 100%;
   height: 100%;
   object-fit: contain;
   position: absolute;
   inset: 0;
   pointer-events: none;
}

.hidden {
   display: none !important;
}

/* --- Pipeline Tracker --- */
.pipeline-tracker {
   padding: 1.2rem;
}

.pipeline-tracker h4 {
   font-size: 0.88rem;
   margin-bottom: 1rem;
   display: flex;
   align-items: center;
   gap: 0.5rem;
   color: var(--text-dim);
}

.steps-container {
   display: flex;
   align-items: center;
   gap: 0.3rem;
   margin-bottom: 1rem;
}

.step {
   display: flex;
   align-items: center;
   gap: 0.5rem;
   flex: 1;
}

.step-connector {
   width: 16px;
   height: 2px;
   background: var(--border);
   flex-shrink: 0;
}

.step-icon {
   width: 30px;
   height: 30px;
   border-radius: 50%;
   background: var(--glass);
   border: 1px solid var(--border);
   display: flex;
   align-items: center;
   justify-content: center;
   font-size: 0.75rem;
   color: var(--text-muted);
   transition: all 0.3s;
   flex-shrink: 0;
}

.step.active .step-icon {
   background: rgba(124, 58, 237, 0.25);
   border-color: var(--accent);
   color: var(--accent-2);
   box-shadow: 0 0 12px rgba(124, 58, 237, 0.3);
}

.step.done .step-icon {
   background: rgba(16, 217, 160, 0.15);
   border-color: var(--accent-green);
   color: var(--accent-green);
}

.step-details {
   display: none;
}

.step-title {
   font-size: 0.7rem;
   font-weight: 600;
}

.step-status {
   font-size: 0.65rem;
   color: var(--text-muted);
}

.loader {
   width: 16px;
   height: 16px;
   border: 2px solid var(--border);
   border-top-color: var(--accent-2);
   border-radius: 50%;
   animation: spin 0.8s linear infinite;
}

@keyframes spin {
   to {
      transform: rotate(360deg);
   }
}

.progress-label {
   display: flex;
   justify-content: space-between;
   font-size: 0.78rem;
   color: var(--text-muted);
   margin-bottom: 0.4rem;
}

.progress-bar-container {
   background: rgba(255, 255, 255, 0.08);
   border-radius: 99px;
   height: 6px;
   overflow: hidden;
}

.progress-bar {
   height: 100%;
   background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-cyan));
   border-radius: 99px;
   width: 0%;
   transition: width 0.5s ease;
   box-shadow: 0 0 8px var(--accent);
}

/* --- Projects Tab --- */
.projects-header {
   display: flex;
   justify-content: space-between;
   align-items: center;
   margin-bottom: 1.5rem;
}

.projects-header h2 {
   font-size: 1.2rem;
   display: flex;
   align-items: center;
   gap: 0.5rem;
}

.projects-grid {
   display: grid;
   grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
   gap: 1.2rem;
   align-items: start;
}

.projects-loading,
.projects-empty {
   grid-column: 1/-1;
   text-align: center;
   padding: 3rem;
   color: var(--text-muted);
   display: flex;
   flex-direction: column;
   align-items: center;
   gap: 1rem;
}

/* ── Tarjeta de proyecto completado ── */
.project-card {
   display: flex;
   flex-direction: column;
   border-radius: var(--radius);
   overflow: hidden;
   background: var(--bg-panel);
   border: 1px solid var(--glass-border);
   transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
   animation: cardIn 0.4s ease;
}

@keyframes cardIn {
   from {
      opacity: 0;
      transform: translateY(16px) scale(0.97);
   }

   to {
      opacity: 1;
      transform: none;
   }
}

.project-card:hover {
   transform: translateY(-4px);
   box-shadow: 0 12px 40px rgba(124, 58, 237, 0.22);
   border-color: rgba(124, 58, 237, 0.45);
}

.project-thumbnail {
   width: 100%;
   aspect-ratio: 9/16;
   max-height: 280px;
   background: #0d0d1a;
   overflow: hidden;
   position: relative;
   flex-shrink: 0;
}

.project-thumbnail video {
   width: 100%;
   height: 100%;
   object-fit: cover;
   display: block;
}

.project-info {
   padding: 0.75rem 0.9rem 0.5rem;
   flex: 1;
}

.project-info h4 {
   font-size: 0.82rem;
   font-weight: 600;
   white-space: nowrap;
   overflow: hidden;
   text-overflow: ellipsis;
   color: var(--text);
}

.project-info p {
   font-size: 0.7rem;
   color: var(--text-muted);
   margin-top: 0.2rem;
   display: flex;
   align-items: center;
   gap: 0.4rem;
   flex-wrap: wrap;
}

.project-date {
   color: var(--text-muted) !important;
   font-size: 0.66rem !important;
}

.project-actions {
   padding: 0.5rem 0.9rem 0.75rem;
   display: flex;
   gap: 0.4rem;
   justify-content: flex-end;
}

/* ── Tarjeta en Procesamiento (LIVE) ── */
.project-card-processing {
   display: flex;
   flex-direction: column;
   border-radius: var(--radius);
   overflow: hidden;
   background: var(--bg-panel);
   border: 1px solid rgba(124, 58, 237, 0.5);
   box-shadow: 0 0 28px rgba(124, 58, 237, 0.2), inset 0 0 40px rgba(124, 58, 237, 0.04);
   animation: cardIn 0.4s ease, processingGlow 3s ease-in-out infinite;
   position: relative;
}

@keyframes processingGlow {

   0%,
   100% {
      box-shadow: 0 0 20px rgba(124, 58, 237, 0.2);
   }

   50% {
      box-shadow: 0 0 40px rgba(168, 85, 247, 0.4);
   }
}

.processing-visual {
   width: 100%;
   aspect-ratio: 9/16;
   max-height: 280px;
   background: linear-gradient(135deg, #0d0d1a 0%, #1a0d2e 50%, #0d0d1a 100%);
   display: flex;
   flex-direction: column;
   align-items: center;
   justify-content: center;
   gap: 1rem;
   position: relative;
   overflow: hidden;
}

/* Shimmer de fondo */
.processing-visual::before {
   content: '';
   position: absolute;
   inset: 0;
   background: linear-gradient(105deg, transparent 40%, rgba(168, 85, 247, 0.08) 50%, transparent 60%);
   background-size: 200% 100%;
   animation: shimmer 2.5s linear infinite;
}

@keyframes shimmer {
   0% {
      background-position: 200% 0;
   }

   100% {
      background-position: -200% 0;
   }
}

/* Partículas flotantes */
.processing-visual::after {
   content: '';
   position: absolute;
   inset: 0;
   background-image:
      radial-gradient(circle, rgba(168, 85, 247, 0.6) 1px, transparent 1px),
      radial-gradient(circle, rgba(99, 102, 241, 0.5) 1px, transparent 1px);
   background-size: 40px 40px, 70px 70px;
   background-position: 0 0, 20px 20px;
   animation: particleFloat 8s linear infinite;
   opacity: 0.3;
}

@keyframes particleFloat {
   0% {
      transform: translateY(0) rotate(0deg);
   }

   100% {
      transform: translateY(-40px) rotate(5deg);
   }
}

/* Círculo de progreso SVG */
.circular-progress {
   position: relative;
   width: 90px;
   height: 90px;
   z-index: 2;
}

.circular-progress svg {
   transform: rotate(-90deg);
   width: 90px;
   height: 90px;
}

.circular-progress .track {
   fill: none;
   stroke: rgba(255, 255, 255, 0.07);
   stroke-width: 5;
}

.circular-progress .fill {
   fill: none;
   stroke: url(#progressGrad);
   stroke-width: 5;
   stroke-linecap: round;
   stroke-dasharray: 245;
   stroke-dashoffset: 245;
   transition: stroke-dashoffset 0.6s cubic-bezier(.4, 0, .2, 1);
}

.circular-progress .pct-label {
   position: absolute;
   inset: 0;
   display: flex;
   flex-direction: column;
   align-items: center;
   justify-content: center;
   font-size: 1.1rem;
   font-weight: 800;
   color: #fff;
   line-height: 1;
}

.circular-progress .pct-label small {
   font-size: 0.55rem;
   color: rgba(255, 255, 255, 0.5);
   font-weight: 400;
   margin-top: 2px;
}

.processing-stage {
   font-size: 0.7rem;
   color: rgba(168, 85, 247, 0.9);
   font-weight: 600;
   letter-spacing: 0.05em;
   text-transform: uppercase;
   z-index: 2;
   text-align: center;
   padding: 0 0.5rem;
}

.processing-stage-msg {
   font-size: 0.62rem;
   color: rgba(255, 255, 255, 0.35);
   z-index: 2;
   text-align: center;
   padding: 0 0.5rem;
   max-width: 160px;
   line-height: 1.4;
}

/* Etiqueta LIVE parpadeante */
.live-badge {
   position: absolute;
   top: 10px;
   right: 10px;
   background: rgba(239, 68, 68, 0.85);
   color: white;
   font-size: 0.6rem;
   font-weight: 800;
   padding: 2px 7px;
   border-radius: 99px;
   letter-spacing: 0.08em;
   display: flex;
   align-items: center;
   gap: 4px;
   z-index: 3;
   animation: livePulse 1.5s ease-in-out infinite;
}

@keyframes livePulse {

   0%,
   100% {
      opacity: 1;
   }

   50% {
      opacity: 0.6;
   }
}

.live-badge::before {
   content: '';
   width: 5px;
   height: 5px;
   background: #fff;
   border-radius: 50%;
   animation: liveDot 1.5s ease-in-out infinite;
}

@keyframes liveDot {

   0%,
   100% {
      transform: scale(1);
   }

   50% {
      transform: scale(1.4);
   }
}

/* Completado con flash */
.project-card-completed-flash {
   animation: completedFlash 0.8s ease;
}

@keyframes completedFlash {
   0% {
      box-shadow: 0 0 0 rgba(16, 217, 160, 0);
      border-color: rgba(124, 58, 237, 0.5);
   }

   40% {
      box-shadow: 0 0 60px rgba(16, 217, 160, 0.6);
      border-color: rgba(16, 217, 160, 0.8);
   }

   100% {
      box-shadow: 0 12px 40px rgba(124, 58, 237, 0.22);
      border-color: rgba(124, 58, 237, 0.45);
   }
}


.api-badge-small {
   background: rgba(124, 58, 237, 0.25);
   color: var(--accent-2);
   border-radius: 4px;
   padding: 1px 5px;
   font-size: 0.65rem;
   text-transform: uppercase;
}

/* ============================================================
   AGENT CHAT
   ============================================================ */

.agent-container {
   display: flex;
   flex-direction: column;
   gap: 1rem;
   height: calc(100vh - 100px);
   max-height: 90vh;
}

.agent-header {
   padding: 1rem 1.5rem;
   display: flex;
   align-items: center;
   gap: 1rem;
}

.agent-avatar {
   position: relative;
   width: 46px;
   height: 46px;
   background: linear-gradient(135deg, var(--accent), var(--accent-2));
   border-radius: 50%;
   display: flex;
   align-items: center;
   justify-content: center;
   font-size: 1.3rem;
   color: white;
   flex-shrink: 0;
}

.agent-status-dot {
   position: absolute;
   bottom: 1px;
   right: 1px;
   width: 10px;
   height: 10px;
   background: var(--accent-green);
   border-radius: 50%;
   border: 2px solid var(--bg-dark);
   box-shadow: 0 0 6px var(--accent-green);
   animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {

   0%,
   100% {
      transform: scale(1)
   }

   50% {
      transform: scale(1.3)
   }
}

.agent-info h3 {
   font-size: 0.95rem;
   font-weight: 700;
}

.agent-info p {
   font-size: 0.78rem;
   color: var(--text-muted);
   margin-top: 0.2rem;
}

.agent-info em {
   color: var(--accent-2);
}

.chat-window {
   flex: 1;
   overflow-y: auto;
   padding: 1rem;
   display: flex;
   flex-direction: column;
   gap: 1rem;
   min-height: 200px;
   scrollbar-width: thin;
   scrollbar-color: var(--accent) transparent;
}

.chat-window::-webkit-scrollbar {
   width: 4px;
}

.chat-window::-webkit-scrollbar-thumb {
   background: var(--accent);
   border-radius: 99px;
}

.chat-message {
   display: flex;
   align-items: flex-end;
   gap: 0.6rem;
   animation: msgSlide 0.3s ease;
}

@keyframes msgSlide {
   from {
      opacity: 0;
      transform: translateY(10px)
   }

   to {
      opacity: 1;
      transform: none
   }
}

.chat-message.user {
   flex-direction: row-reverse;
}

.msg-avatar {
   width: 32px;
   height: 32px;
   border-radius: 50%;
   display: flex;
   align-items: center;
   justify-content: center;
   font-size: 0.85rem;
   flex-shrink: 0;
}

.chat-message.bot .msg-avatar {
   background: linear-gradient(135deg, var(--accent), var(--accent-2));
   color: white;
}

.chat-message.user .msg-avatar,
.user-avatar {
   background: rgba(6, 182, 212, 0.2);
   color: var(--accent-cyan);
   border: 1px solid rgba(6, 182, 212, 0.3);
}

.msg-bubble {
   max-width: 70%;
   background: var(--bg-panel);
   border: 1px solid var(--glass-border);
   border-radius: 16px;
   padding: 0.75rem 1rem;
   font-size: 0.85rem;
   line-height: 1.6;
   position: relative;
}

.chat-message.bot .msg-bubble {
   border-radius: 4px 16px 16px 16px;
}

.chat-message.user .msg-bubble {
   border-radius: 16px 4px 16px 16px;
   background: rgba(124, 58, 237, 0.2);
   border-color: rgba(124, 58, 237, 0.3);
}

.msg-bubble strong {
   color: var(--accent-2);
}

.msg-bubble code {
   background: rgba(0, 0, 0, 0.3);
   border-radius: 4px;
   padding: 1px 5px;
   font-size: 0.8rem;
}

.msg-bubble li {
   margin-left: 1rem;
}

.msg-time {
   display: block;
   font-size: 0.65rem;
   color: var(--text-muted);
   margin-top: 0.4rem;
   text-align: right;
}

.agent-help-list {
   list-style: none;
   margin-top: 0.4rem;
   display: flex;
   flex-direction: column;
   gap: 0.3rem;
}

.agent-help-list li {
   font-size: 0.82rem;
   padding: 0.25rem 0;
   border-bottom: 1px solid var(--glass-border);
}

.agent-help-list li:last-child {
   border: none;
}

.agent-help-list em {
   color: var(--accent-cyan);
}

/* Typing indicator */
.typing-dots {
   display: flex;
   gap: 4px;
   align-items: center;
   padding: 4px 0;
}

.typing-dots span {
   width: 6px;
   height: 6px;
   background: var(--accent-2);
   border-radius: 50%;
   animation: typing 1.4s infinite;
}

.typing-dots span:nth-child(2) {
   animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
   animation-delay: 0.4s;
}

@keyframes typing {

   0%,
   80%,
   100% {
      transform: scale(1);
      opacity: 0.5
   }

   40% {
      transform: scale(1.3);
      opacity: 1
   }
}

.chat-input-area {
   padding: 1rem;
   display: flex;
   gap: 0.75rem;
   align-items: flex-end;
}

.chat-input-area textarea {
   flex: 1;
   background: rgba(255, 255, 255, 0.05);
   border: 1px solid var(--border);
   border-radius: var(--radius-sm);
   color: var(--text);
   padding: 0.65rem 0.9rem;
   font-size: 0.88rem;
   resize: none;
   min-height: 48px;
   max-height: 140px;
   transition: border 0.2s;
}

.chat-input-area textarea:focus {
   outline: none;
   border-color: var(--accent);
}

/* ============================================================
   SETTINGS MODAL
   ============================================================ */
.modal-overlay {
   position: fixed;
   inset: 0;
   background: rgba(0, 0, 0, 0.7);
   backdrop-filter: blur(8px);
   z-index: 1000;
   display: flex;
   align-items: center;
   justify-content: center;
   padding: 1rem;
}

.modal-overlay.hidden {
   display: none;
}

.modal-content {
   width: 100%;
   max-width: 680px;
   max-height: 92vh;
   overflow-y: auto;
   border-radius: var(--radius);
   display: flex;
   flex-direction: column;
}

.modal-header {
   display: flex;
   justify-content: space-between;
   align-items: center;
   padding: 1.25rem 1.5rem;
   border-bottom: 1px solid var(--border);
   position: sticky;
   top: 0;
   background: var(--bg-panel);
   z-index: 1;
   backdrop-filter: blur(20px);
   border-radius: var(--radius) var(--radius) 0 0;
}

.modal-header h2 {
   font-size: 1.05rem;
   display: flex;
   align-items: center;
   gap: 0.5rem;
}

.modal-footer {
   display: flex;
   justify-content: flex-end;
   gap: 0.75rem;
   padding: 1.25rem 1.5rem;
   border-top: 1px solid var(--border);
   margin-top: 1rem;
}

#settings-form {
   padding: 0 1.5rem;
}

.settings-section {
   font-size: 0.8rem;
   font-weight: 700;
   color: var(--text-muted);
   text-transform: uppercase;
   letter-spacing: 0.05em;
   margin: 1.5rem 0 0.75rem;
   display: flex;
   align-items: center;
   gap: 0.4rem;
}

/* Settings Sub-tabs */
.settings-tabs {
   display: flex;
   gap: 0.25rem;
   padding: 0.75rem 1.5rem 0;
   border-bottom: 1px solid var(--border);
   overflow-x: auto;
}

.settings-tab {
   background: none;
   border: none;
   color: var(--text-muted);
   font-size: 0.8rem;
   font-weight: 600;
   padding: 0.5rem 0.8rem;
   cursor: pointer;
   border-bottom: 2px solid transparent;
   transition: all 0.2s;
   display: flex;
   align-items: center;
   gap: 0.4rem;
   white-space: nowrap;
}

.settings-tab:hover {
   color: var(--text);
}

.settings-tab.active {
   color: var(--accent-2);
   border-bottom-color: var(--accent-2);
}

.stab-content {
   display: none;
   padding: 1rem 0;
}

.stab-content.active {
   display: block;
}

/* API Cards */
.api-selector {
   margin-bottom: 0.5rem;
}

.api-selector>p {
   margin-bottom: 0.75rem;
}

.api-cards {
   display: grid;
   grid-template-columns: repeat(3, 1fr);
   gap: 0.75rem;
}

.api-card {
   background: var(--glass);
   border: 2px solid var(--glass-border);
   border-radius: var(--radius-sm);
   padding: 0.9rem;
   cursor: pointer;
   transition: all 0.2s;
}

.api-card:hover {
   border-color: rgba(124, 58, 237, 0.4);
   background: rgba(124, 58, 237, 0.08);
}

.api-card.active {
   border-color: var(--accent);
   background: rgba(124, 58, 237, 0.15);
   box-shadow: 0 0 20px rgba(124, 58, 237, 0.2);
}

/* Groq card specific amber active state */
#api-card-groq.active {
   border-color: #f59e0b;
   background: rgba(245, 158, 11, 0.15);
   box-shadow: 0 0 20px rgba(245, 158, 11, 0.2);
}

#api-card-groq:hover {
   border-color: rgba(245, 158, 11, 0.4);
   background: rgba(245, 158, 11, 0.08);
}

#api-card-groq.active .api-radio-indicator {
   border-color: #f59e0b;
   background: #f59e0b;
   box-shadow: 0 0 6px #f59e0b;
}

.api-card-header {
   display: flex;
   align-items: center;
   gap: 0.5rem;
   margin-bottom: 0.4rem;
   font-weight: 700;
   font-size: 0.88rem;
}

.api-radio-indicator {
   width: 14px;
   height: 14px;
   border-radius: 50%;
   border: 2px solid var(--border);
   margin-left: auto;
   transition: all 0.2s;
}

.api-card.active .api-radio-indicator {
   border-color: var(--accent);
   background: var(--accent);
   box-shadow: 0 0 6px var(--accent);
}

.api-card-desc {
   font-size: 0.75rem;
   color: var(--text-muted);
   line-height: 1.4;
}

/* ============================================================
   MUSIC LIBRARY
   ============================================================ */
.music-selected-info {
   display: flex;
   align-items: center;
   gap: 0.6rem;
   background: var(--glass);
   border: 1px solid var(--glass-border);
   border-radius: var(--radius-sm);
   padding: 0.6rem 0.9rem;
   margin: 0.5rem 0;
   font-size: 0.83rem;
}

.music-selected-info i {
   color: var(--accent-2);
}

#music-selected-name {
   flex: 1;
   overflow: hidden;
   text-overflow: ellipsis;
   white-space: nowrap;
}

.music-controls {
   background: var(--glass);
   border: 1px solid var(--glass-border);
   border-radius: var(--radius-sm);
   padding: 0.75rem;
   margin-bottom: 0.75rem;
}

.music-upload-row {
   display: flex;
   align-items: center;
   gap: 0.75rem;
   margin-bottom: 0.75rem;
}

.music-search-row {
   margin-bottom: 0.75rem;
}

.music-library {
   max-height: 320px;
   overflow-y: auto;
   display: flex;
   flex-direction: column;
   gap: 0.75rem;
   scrollbar-width: thin;
   scrollbar-color: var(--accent) transparent;
}

.music-library::-webkit-scrollbar {
   width: 4px;
}

.music-library::-webkit-scrollbar-thumb {
   background: var(--accent);
   border-radius: 99px;
}

.music-folder-group {}

.music-folder-label {
   font-size: 0.75rem;
   font-weight: 700;
   text-transform: uppercase;
   color: var(--text-muted);
   letter-spacing: 0.05em;
   padding: 0.3rem 0;
   margin-bottom: 0.4rem;
   display: flex;
   align-items: center;
   gap: 0.4rem;
}

.music-cards {
   display: flex;
   flex-direction: column;
   gap: 0.35rem;
}

.music-card {
   display: flex;
   align-items: center;
   justify-content: space-between;
   background: var(--glass);
   border: 1px solid var(--glass-border);
   border-radius: var(--radius-sm);
   padding: 0.5rem 0.75rem;
   cursor: pointer;
   transition: all 0.2s;
}

.music-card:hover {
   border-color: rgba(124, 58, 237, 0.3);
   background: rgba(124, 58, 237, 0.08);
}

.music-card.selected {
   border-color: var(--accent-green);
   background: rgba(16, 217, 160, 0.08);
}

.music-card-info {
   display: flex;
   align-items: center;
   gap: 0.6rem;
   min-width: 0;
}

.music-icon {
   color: var(--accent-2);
   font-size: 0.85rem;
   flex-shrink: 0;
}

.music-card-text {
   min-width: 0;
}

.music-card-name {
   display: block;
   font-size: 0.8rem;
   font-weight: 600;
   white-space: nowrap;
   overflow: hidden;
   text-overflow: ellipsis;
   max-width: 200px;
}

.music-card-size {
   display: block;
   font-size: 0.68rem;
   color: var(--text-muted);
}

.music-card-actions {
   display: flex;
   gap: 0.4rem;
   flex-shrink: 0;
}

.btn-music-preview,
.btn-music-select {
   background: rgba(255, 255, 255, 0.06);
   border: 1px solid var(--border);
   border-radius: 6px;
   color: var(--text-muted);
   cursor: pointer;
   padding: 0.3rem 0.5rem;
   font-size: 0.75rem;
   transition: all 0.2s;
}

.btn-music-preview:hover {
   color: var(--accent-2);
   border-color: var(--accent);
}

.btn-music-select:hover,
.btn-music-select.selected {
   color: var(--accent-green);
   border-color: var(--accent-green);
   background: rgba(16, 217, 160, 0.1);
}

.music-loading,
.music-empty {
   text-align: center;
   padding: 2rem;
   color: var(--text-muted);
   font-size: 0.85rem;
}

#upload-progress-msg {
   display: flex;
   align-items: center;
   gap: 0.4rem;
}

/* ============================================================
   TOASTS
   ============================================================ */
#toast-container {
   position: fixed;
   bottom: 1.5rem;
   right: 1.5rem;
   z-index: 9999;
   display: flex;
   flex-direction: column;
   gap: 0.5rem;
}

.toast {
   background: var(--bg-panel);
   border: 1px solid var(--glass-border);
   border-radius: var(--radius-sm);
   padding: 0.75rem 1rem;
   font-size: 0.84rem;
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 0.75rem;
   min-width: 250px;
   max-width: 380px;
   transform: translateX(120%);
   transition: transform 0.3s ease;
   box-shadow: var(--shadow);
}

.toast.show {
   transform: none;
}

.toast-success {
   border-left: 3px solid var(--accent-green);
}

.toast-error {
   border-left: 3px solid #ef4444;
}

.toast-info {
   border-left: 3px solid var(--accent-cyan);
}

.toast-warning {
   border-left: 3px solid var(--accent-amber);
}

.toast button {
   background: none;
   border: none;
   color: var(--text-muted);
   cursor: pointer;
   font-size: 0.8rem;
   padding: 0.1rem 0.3rem;
}

/* ============================================================
   MOBILE
   ============================================================ */
.hamburger-btn {
   display: none;
   position: fixed;
   top: 1rem;
   left: 1rem;
   z-index: 200;
   background: var(--bg-panel);
   border: 1px solid var(--border);
   border-radius: var(--radius-sm);
   padding: 0.6rem 0.8rem;
   color: var(--text);
   cursor: pointer;
   font-size: 1rem;
}

.sidebar-overlay {
   display: none;
   position: fixed;
   inset: 0;
   background: rgba(0, 0, 0, 0.6);
   z-index: 90;
}

.sidebar-overlay.active {
   display: block;
}

@media (max-width: 700px) {
   .sidebar {
      transform: translateX(-100%);
   }

   .sidebar.open {
      transform: none;
   }

   .hamburger-btn {
      display: flex;
      align-items: center;
   }

   .workspace {
      margin-left: 0;
   }

   .tab-content {
      padding: 1rem;
   }

   .settings-row {
      grid-template-columns: 1fr;
   }

   .toggle-grid {
      grid-template-columns: 1fr;
   }

   .api-cards {
      grid-template-columns: 1fr;
   }

   .msg-bubble {
      max-width: 88%;
   }

   .chat-input-area {
      padding: 0.75rem;
   }
}

/* ============================================================
   Subtitle Editor (se-*) — Professional Editor Tab
   ============================================================ */

/* Preview wrapper */
.se-preview-wrapper {
   position: relative;
   background: #050508;
   border-radius: var(--radius);
   overflow: hidden;
   height: 360px;
   display: flex;
   align-items: center;
   justify-content: center;
   margin-bottom: 1rem;
   border: 1px solid var(--border);
}

#se-video {
   position: absolute;
   inset: 0;
   width: 100%;
   height: 100%;
   object-fit: contain;
   z-index: 1;
}

#se-overlay-canvas {
   position: absolute;
   inset: 0;
   width: 100%;
   height: 100%;
   pointer-events: none;
   z-index: 10;
}

/* Drop zone */
.se-drop-zone {
   position: absolute;
   inset: 0;
   display: flex;
   flex-direction: column;
   align-items: center;
   justify-content: center;
   gap: 10px;
   cursor: pointer;
   z-index: 5;
   color: var(--text-muted);
   transition: background 0.2s;
   text-align: center;
   padding: 1.5rem;
}

.se-drop-zone p {
   font-size: 0.95rem;
   font-weight: 600;
   color: var(--text-dim);
}

.se-drop-zone small {
   font-size: 0.72rem;
   letter-spacing: 0.1em;
   opacity: 0.55;
   text-transform: uppercase;
}

.se-drop-zone:hover,
.se-drop-zone.dragover {
   background: rgba(124, 58, 237, 0.07);
   border: 2px dashed var(--accent);
}

.se-drop-zone.dragover {
   background: rgba(124, 58, 237, 0.13);
}

/* Video controls bar */
.se-vid-controls {
   position: absolute;
   bottom: 0;
   left: 0;
   right: 0;
   background: linear-gradient(transparent, rgba(0, 0, 0, 0.92));
   padding: 12px 16px;
   display: flex;
   align-items: center;
   gap: 10px;
   z-index: 20;
   opacity: 0;
   transition: opacity 0.2s;
}

.se-preview-wrapper:hover .se-vid-controls {
   opacity: 1;
}

.se-vbtn {
   background: none;
   border: none;
   color: #fff;
   cursor: pointer;
   font-size: 1rem;
   padding: 4px 8px;
   opacity: 0.85;
   transition: opacity 0.15s;
   border-radius: 6px;
}

.se-vbtn:hover {
   opacity: 1;
   background: rgba(255, 255, 255, 0.1);
}

.se-seekbar {
   flex: 1;
   height: 4px;
   accent-color: var(--accent-2);
   cursor: pointer;
}

.se-time-label {
   font-size: 0.72rem;
   color: #aaa;
   white-space: nowrap;
   min-width: 76px;
   text-align: right;
}

/* Animation selector grid */
.se-anim-grid {
   display: grid;
   grid-template-columns: 1fr 1fr;
   gap: 6px;
   margin-bottom: 0.5rem;
}

.se-anim-btn {
   background: rgba(255, 255, 255, 0.04);
   border: 1px solid var(--border);
   border-radius: 8px;
   padding: 8px 6px;
   font-size: 0.72rem;
   font-weight: 700;
   letter-spacing: 0.05em;
   color: var(--text-muted);
   cursor: pointer;
   text-align: center;
   transition: all 0.15s;
   text-transform: uppercase;
}

.se-anim-btn:hover {
   border-color: var(--accent-2);
   color: var(--text);
}

.se-anim-btn.active {
   border-color: var(--accent-2);
   color: var(--accent-2);
   background: rgba(168, 85, 247, 0.13);
   box-shadow: 0 0 8px rgba(168, 85, 247, 0.2);
}

/* Status badge */
.se-status {
   font-size: 0.72rem;
   font-weight: 700;
   letter-spacing: 0.06em;
   padding: 5px 12px;
   border-radius: 20px;
   text-align: center;
   line-height: 1.4;
}

.se-status.ok {
   background: rgba(16, 217, 160, 0.12);
   color: var(--accent-green);
   border: 1px solid var(--accent-green);
}

.se-status.info {
   background: rgba(6, 182, 212, 0.1);
   color: var(--accent-cyan);
   border: 1px solid var(--accent-cyan);
}

.se-status.warn {
   background: rgba(245, 158, 11, 0.1);
   color: var(--accent-amber);
   border: 1px solid var(--accent-amber);
}

.se-status.processing {
   background: rgba(124, 58, 237, 0.12);
   color: var(--accent-2);
   border: 1px solid var(--accent-2);
   animation: pulse-badge 1.2s infinite;
}

/* Subtitle list */
.se-subtitles-scroll {
   display: flex;
   flex-direction: column;
   gap: 6px;
   max-height: 300px;
   overflow-y: auto;
   scrollbar-width: thin;
   scrollbar-color: var(--border) transparent;
   padding-right: 2px;
   margin-bottom: 0.75rem;
}

.se-sub-item {
   background: rgba(255, 255, 255, 0.03);
   border: 1px solid var(--border);
   border-radius: 9px;
   padding: 10px 12px;
   display: flex;
   flex-direction: column;
   gap: 6px;
   position: relative;
   transition: border-color 0.15s;
}

.se-sub-item:hover {
   border-color: rgba(124, 58, 237, 0.3);
}

.se-sub-del {
   position: absolute;
   top: 7px;
   right: 8px;
   background: none;
   border: none;
   color: var(--text-muted);
   cursor: pointer;
   font-size: 0.9rem;
   padding: 2px 6px;
   border-radius: 4px;
   transition: color 0.15s, background 0.15s;
   line-height: 1;
}

.se-sub-del:hover {
   color: #f94144;
   background: rgba(249, 65, 68, 0.1);
}

.se-sub-text {
   font-size: 0.82rem;
   padding-right: 28px;
}

.se-sub-times {
   display: grid;
   grid-template-columns: 1fr 1fr;
   gap: 6px;
}

.se-sub-times label {
   display: flex;
   flex-direction: column;
   gap: 3px;
   font-size: 0.62rem;
   color: var(--text-muted);
   letter-spacing: 0.06em;
   text-transform: uppercase;
}

.se-sub-times .glass-input {
   font-size: 0.78rem;
   padding: 4px 8px;
}

.se-add-btn {
   background: none;
   border: 1px dashed var(--border);
   color: var(--text-muted);
   border-radius: 8px;
   padding: 7px;
   width: 100%;
   cursor: pointer;
   font-size: 0.76rem;
   transition: all 0.15s;
   text-align: center;
}

.se-add-btn:hover {
   border-color: var(--accent-cyan);
   color: var(--accent-cyan);
}

/* Progress bar */
.se-prog {
   display: flex;
   flex-direction: column;
   gap: 6px;
   margin-bottom: 0.75rem;
}

.se-prog-bg {
   height: 6px;
   background: var(--border);
   border-radius: 4px;
   overflow: hidden;
}

.se-prog-bar {
   height: 100%;
   background: linear-gradient(90deg, var(--accent), var(--accent-2));
   border-radius: 4px;
   width: 0%;
   transition: width 0.15s;
}

/* Background extraction overlay inside preview */
.se-extract-overlay {
   position: absolute;
   inset: 0;
   background: rgba(6, 6, 18, 0.82);
   backdrop-filter: blur(6px);
   display: flex;
   flex-direction: column;
   align-items: center;
   justify-content: center;
   gap: 18px;
   z-index: 30;
   border-radius: var(--radius);
}

.se-extract-overlay.hidden {
   display: none;
}

/* Circular SVG spinner */
.se-circular-progress {
   position: relative;
   width: 90px;
   height: 90px;
}

.se-circular-progress svg {
   transform: rotate(-90deg);
}

.se-circular-progress .se-track {
   fill: none;
   stroke: rgba(168, 85, 247, 0.15);
   stroke-width: 6;
}

.se-circular-progress .se-fill {
   fill: none;
   stroke: url(#seGrad);
   stroke-width: 6;
   stroke-linecap: round;
   stroke-dasharray: 251;
   stroke-dashoffset: 251;
   animation: se-circle-spin 2s ease-in-out infinite;
   filter: drop-shadow(0 0 6px rgba(168, 85, 247, 0.7));
}

.se-circular-progress .se-brain-icon {
   position: absolute;
   inset: 0;
   display: flex;
   align-items: center;
   justify-content: center;
   font-size: 1.8rem;
   color: var(--accent-2);
   animation: se-pulse-icon 1.5s ease-in-out infinite;
}

@keyframes se-circle-spin {
   0% {
      stroke-dashoffset: 251;
      opacity: 0.6;
   }

   50% {
      stroke-dashoffset: 40;
      opacity: 1;
   }

   100% {
      stroke-dashoffset: 251;
      opacity: 0.6;
   }
}

@keyframes se-pulse-icon {

   0%,
   100% {
      transform: scale(1);
      filter: drop-shadow(0 0 4px var(--accent));
   }

   50% {
      transform: scale(1.1);
      filter: drop-shadow(0 0 10px var(--accent-2));
   }
}

.se-extract-overlay .se-ext-title {
   font-size: 1rem;
   font-weight: 700;
   color: var(--text);
   letter-spacing: 0.08em;
}

.se-extract-overlay .se-ext-sub {
   font-size: 0.78rem;
   color: var(--text-muted);
}

.se-extract-steps {
   display: flex;
   flex-direction: column;
   gap: 6px;
   min-width: 210px;
}

.se-step {
   display: flex;
   align-items: center;
   gap: 8px;
   font-size: 0.78rem;
   color: var(--text-muted);
   transition: color 0.3s;
}

.se-step.active {
   color: var(--accent-2);
}

.se-step.done {
   color: var(--accent-green);
}

.se-step-dot {
   width: 8px;
   height: 8px;
   border-radius: 50%;
   background: var(--text-muted);
   flex-shrink: 0;
   transition: background 0.3s;
}

.se-step.active .se-step-dot {
   background: var(--accent-2);
   box-shadow: 0 0 6px var(--accent);
   animation: pulse-badge 1s infinite;
}

.se-step.done .se-step-dot {
   background: var(--accent-green);
}

@keyframes se-spin {
   from {
      transform: rotate(0deg);
   }

   to {
      transform: rotate(360deg);
   }
}

/* Sync offset control row */
.se-sync-row {
   margin-bottom: 0.3rem;
   background: rgba(168, 85, 247, 0.06);
   border: 1px solid rgba(168, 85, 247, 0.18);
   border-radius: 8px;
   padding: 10px 14px 6px;
}

.se-sync-control label {
   display: block;
   font-size: 0.78rem;
   color: var(--text-muted);
   margin-bottom: 6px;
   font-weight: 600;
}

/* Instant regroup circular flash on canvas */
@keyframes se-regroup-flash {
   0% {
      opacity: 0;
   }

   15% {
      opacity: 0.85;
   }

   85% {
      opacity: 0.85;
   }

   100% {
      opacity: 0;
   }
}

/* ── Auto-Subtitle Toggle Pill ─────────────────────── */
.se-auto-sub-toggle {
   cursor: pointer;
   user-select: none;
}

.se-toggle-pill {
   display: inline-flex;
   align-items: center;
   gap: 7px;
   padding: 5px 12px 5px 10px;
   border-radius: 20px;
   background: rgba(255, 255, 255, 0.06);
   border: 1px solid var(--border);
   font-size: 0.76rem;
   font-weight: 600;
   color: var(--text-muted);
   transition: background 0.25s, border-color 0.25s, color 0.25s, box-shadow 0.25s;
   white-space: nowrap;
}

.se-toggle-dot {
   width: 14px;
   height: 14px;
   border-radius: 50%;
   background: var(--text-muted);
   transition: background 0.25s, box-shadow 0.25s;
   flex-shrink: 0;
}

/* Active state — when checkbox is checked */
.se-auto-sub-toggle input[type="checkbox"]:checked~.se-toggle-pill {
   background: linear-gradient(135deg, rgba(124, 58, 237, 0.35), rgba(168, 85, 247, 0.25));
   border-color: var(--accent);
   color: var(--accent-2);
   box-shadow: 0 0 12px rgba(168, 85, 247, 0.3);
}

.se-auto-sub-toggle input[type="checkbox"]:checked~.se-toggle-pill .se-toggle-dot {
   background: var(--accent-2);
   box-shadow: 0 0 8px var(--accent);
   animation: pulse-badge 1.2s ease-in-out infinite;
}

/* ═══════════════════════════════════════════════════════════════
   🎬  PRODUCTION BOARD — Premium Styles
   ═══════════════════════════════════════════════════════════════ */

/* ── Launch button in sidebar panel ── */
.adv-compact-cfg {
   display: flex;
   flex-direction: column;
   gap: 0.6rem;
   margin-bottom: 0.75rem;
}

.adv-cfg-row {
   display: grid;
   grid-template-columns: 1fr 1fr;
   gap: 0.75rem;
}

.adv-storyboard-toggle-row {
   display: flex;
   align-items: center;
   cursor: pointer;
   margin-top: 0.25rem;
}

.adv-storyboard-toggle-row input {
   display: none;
}

.adv-launch-btn {
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 0.6rem;
   padding: 0.85rem 1rem;
   margin-top: 0.5rem;
   background: linear-gradient(135deg, rgba(124, 58, 237, 0.3), rgba(168, 85, 247, 0.2));
   border: 1px solid rgba(124, 58, 237, 0.4);
   border-radius: var(--radius-sm);
   color: var(--accent-2);
   font-weight: 700;
   font-size: 0.9rem;
   text-decoration: none;
   transition: all 0.25s;
   position: relative;
   overflow: hidden;
}

.adv-launch-btn::before {
   content: '';
   position: absolute;
   inset: 0;
   background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
   transform: translateX(-100%);
   transition: transform 0.5s;
}

.adv-launch-btn:hover::before {
   transform: translateX(100%);
}

.adv-launch-btn:hover {
   background: linear-gradient(135deg, rgba(124, 58, 237, 0.5), rgba(168, 85, 247, 0.35));
   box-shadow: 0 0 24px rgba(124, 58, 237, 0.4);
   transform: translateY(-1px);
}

/* ── Modal Overlay ── */
.adv-board-overlay {
   position: fixed;
   inset: 0;
   background: rgba(5, 5, 15, 0.92);
   backdrop-filter: blur(12px);
   z-index: 2000;
   display: flex;
   align-items: stretch;
   animation: fadeIn 0.25s ease;
}

.adv-board-overlay.adv-hidden {
   display: none !important;
}

.adv-board-container {
   display: flex;
   flex-direction: column;
   width: 100%;
   height: 100%;
   overflow: hidden;
}

/* ── Header ── */
.adv-board-header {
   display: flex;
   align-items: center;
   justify-content: space-between;
   padding: 1rem 1.5rem;
   background: rgba(10, 10, 24, 0.95);
   border-bottom: 1px solid rgba(124, 58, 237, 0.25);
   flex-shrink: 0;
}

.adv-board-title {
   display: flex;
   align-items: center;
   gap: 0.6rem;
   font-family: 'Space Grotesk', sans-serif;
   font-size: 1.1rem;
   font-weight: 700;
   color: var(--accent-2);
}

.adv-board-topic {
   font-size: 0.8rem;
   font-weight: 400;
   color: var(--text-muted);
   padding: 2px 8px;
   background: rgba(255, 255, 255, 0.05);
   border-radius: 99px;
}

/* ── Phase Stepper ── */
.adv-stepper {
   display: flex;
   align-items: center;
   padding: 1rem 2rem;
   background: rgba(10, 10, 24, 0.8);
   border-bottom: 1px solid var(--border);
   flex-shrink: 0;
   gap: 0;
}

.adv-phase-step {
   display: flex;
   flex-direction: column;
   align-items: center;
   gap: 4px;
   cursor: pointer;
}

.adv-phase-step span {
   font-size: 0.7rem;
   font-weight: 600;
   color: var(--text-muted);
   transition: color 0.3s;
}

.adv-step-circle {
   width: 34px;
   height: 34px;
   border-radius: 50%;
   border: 2px solid rgba(255, 255, 255, 0.12);
   display: flex;
   align-items: center;
   justify-content: center;
   font-size: 0.85rem;
   font-weight: 700;
   color: var(--text-muted);
   transition: all 0.35s;
   background: rgba(255, 255, 255, 0.04);
}

.adv-phase-step.active .adv-step-circle {
   border-color: var(--accent-2);
   background: linear-gradient(135deg, var(--accent), var(--accent-2));
   color: white;
   box-shadow: 0 0 16px rgba(124, 58, 237, 0.6);
}

.adv-phase-step.active span {
   color: var(--accent-2);
}

.adv-phase-step.done .adv-step-circle {
   border-color: var(--accent-green);
   background: rgba(16, 217, 160, 0.15);
   color: var(--accent-green);
}

.adv-phase-step.done span {
   color: var(--accent-green);
}

.adv-step-line {
   flex: 1;
   height: 2px;
   background: rgba(255, 255, 255, 0.08);
   margin: 0 0.5rem;
   margin-bottom: 18px;
   transition: background 0.4s;
}

.adv-phase-step.done~.adv-step-line {
   background: var(--accent-green);
}

/* ── Board Body ── */
.adv-board-body {
   flex: 1;
   overflow-y: auto;
   padding: 1.5rem 2rem;
   scrollbar-width: thin;
   scrollbar-color: rgba(124, 58, 237, 0.3) transparent;
}

/* ── Phase Panels ── */
.adv-phase-content {
   display: none;
   animation: fadeIn 0.3s ease;
}

.adv-phase-visible {
   display: block;
}

.adv-phase-title {
   font-family: 'Space Grotesk', sans-serif;
   font-size: 1.1rem;
   font-weight: 700;
   color: var(--text);
   margin-bottom: 1.25rem;
   display: flex;
   align-items: center;
   gap: 0.5rem;
}

.adv-phase-title i {
   color: var(--accent-2);
}

/* ── Script Area ── */
.adv-topic-ta {
   resize: vertical;
   min-height: 60px;
}

.adv-script-ta {
   resize: vertical;
   min-height: 200px;
   font-family: 'Courier New', monospace;
   font-size: 0.85rem;
   line-height: 1.7;
   border-color: rgba(124, 58, 237, 0.3) !important;
}

.adv-script-label {
   display: flex;
   align-items: center;
   gap: 0.5rem;
   font-size: 0.82rem;
   font-weight: 600;
   color: var(--text-dim);
   margin-bottom: 0.5rem;
}

.adv-script-hint {
   color: var(--accent-2);
   font-weight: 400;
}

.adv-phase1-btns {
   display: flex;
   gap: 0.75rem;
   flex-wrap: wrap;
   margin-bottom: 0.5rem;
}

.adv-phase1-next {
   display: flex;
   justify-content: flex-end;
   margin-top: 1rem;
}

.adv-next-btn {
   display: inline-flex;
   align-items: center;
   gap: 0.5rem;
   padding: 0.7rem 1.4rem;
   background: linear-gradient(135deg, var(--accent), var(--accent-2));
   color: white;
   border: none;
   border-radius: var(--radius-sm);
   font-size: 0.9rem;
   font-weight: 700;
   cursor: pointer;
   transition: all 0.25s;
}

.adv-next-btn:hover:not(:disabled) {
   transform: translateY(-2px);
   box-shadow: 0 6px 24px rgba(124, 58, 237, 0.5);
}

.adv-next-btn:disabled {
   opacity: 0.5;
   cursor: not-allowed;
}

/* ── Prompt Checks & Toolbar → ver bloque al final del archivo ── */


/* ── Scene Cards ── */
.adv-scenes-board {
   display: flex;
   flex-direction: column;
   gap: 1rem;
}

.adv-scene-card {
   background: rgba(16, 16, 32, 0.9);
   border-radius: var(--radius);
   overflow: hidden;
   position: relative;
   animation: adv-slide-in 0.4s ease both;
   border: 1px solid rgba(255, 255, 255, 0.06);
   transition: border-color 0.4s, box-shadow 0.4s;
}

@keyframes adv-slide-in {
   from {
      opacity: 0;
      transform: translateY(20px);
   }

   to {
      opacity: 1;
      transform: none;
   }
}

/* Score-based glow borders */
.adv-scene-card::before {
   content: '';
   position: absolute;
   inset: -1px;
   border-radius: calc(var(--radius) + 1px);
   padding: 1px;
   -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
   -webkit-mask-composite: xor;
   mask-composite: exclude;
   pointer-events: none;
   opacity: 0;
   transition: opacity 0.4s;
}

.adv-scene-card.adv-score-1::before {
   background: linear-gradient(135deg, rgba(99, 102, 241, 0.6), transparent);
   opacity: 1;
}

.adv-scene-card.adv-score-2::before {
   background: linear-gradient(135deg, rgba(124, 58, 237, 0.7), rgba(168, 85, 247, 0.5));
   opacity: 1;
}

.adv-scene-card.adv-score-3::before {
   background: linear-gradient(135deg, rgba(168, 85, 247, 0.8), rgba(6, 182, 212, 0.6));
   opacity: 1;
}

.adv-scene-card.adv-score-4::before {
   background: linear-gradient(135deg, var(--accent-green), rgba(6, 182, 212, 0.8));
   opacity: 1;
   box-shadow: 0 0 20px rgba(16, 217, 160, 0.2);
}

.adv-scene-card.adv-score-4 {
   box-shadow: 0 4px 24px rgba(16, 217, 160, 0.15);
}

/* Card Header */
.adv-scene-header {
   display: flex;
   align-items: center;
   gap: 0.75rem;
   padding: 0.65rem 1rem;
   background: rgba(0, 0, 0, 0.3);
   border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.adv-scene-badge {
   width: 28px;
   height: 28px;
   border-radius: 50%;
   background: linear-gradient(135deg, var(--accent), var(--accent-2));
   display: flex;
   align-items: center;
   justify-content: center;
   font-size: 0.75rem;
   font-weight: 800;
   color: white;
   flex-shrink: 0;
   box-shadow: 0 0 10px rgba(124, 58, 237, 0.4);
}

.adv-scene-title-input {
   flex: 1;
   background: transparent;
   border: none;
   color: var(--text);
   font-size: 0.85rem;
   font-weight: 600;
   outline: none;
   padding: 0;
}

.adv-scene-title-input:focus {
   color: var(--accent-2);
}

.adv-scene-readiness {
   display: flex;
   gap: 4px;
}

.adv-ready-dot {
   width: 20px;
   height: 20px;
   border-radius: 4px;
   background: rgba(255, 255, 255, 0.06);
   border: 1px solid rgba(255, 255, 255, 0.1);
   display: flex;
   align-items: center;
   justify-content: center;
   font-size: 0.6rem;
   font-weight: 700;
   color: var(--text-muted);
   transition: all 0.3s;
}

.adv-ready-dot.adv-dot-ok {
   background: rgba(16, 217, 160, 0.2);
   border-color: var(--accent-green);
   color: var(--accent-green);
}

.adv-scene-del-btn {
   background: transparent;
   border: none;
   color: var(--text-muted);
   cursor: pointer;
   padding: 4px;
   border-radius: 4px;
   transition: all 0.2s;
   font-size: 0.85rem;
}

.adv-scene-del-btn:hover {
   background: rgba(239, 68, 68, 0.15);
   color: #ef4444;
}

/* Card Columns (Vertical Layout) */
.adv-scene-vertical-layout {
   display: flex;
   flex-direction: column;
   gap: 1rem;
   padding: 1rem;
}

.adv-col-text,
.adv-col-prompts,
.adv-col-media {
   display: flex;
   flex-direction: column;
   gap: 0.5rem;
}

.adv-col-label {
   font-size: 0.72rem;
   font-weight: 700;
   text-transform: uppercase;
   letter-spacing: 0.06em;
   color: var(--text-muted);
   margin-bottom: 0.5rem;
   display: flex;
   align-items: center;
   gap: 0.4rem;
}

.adv-col-label i {
   color: var(--accent-2);
}

.adv-col-textarea {
   width: 100%;
   background: rgba(255, 255, 255, 0.03);
   border: 1px solid rgba(255, 255, 255, 0.06);
   border-radius: 6px;
   color: var(--text);
   font-size: 0.8rem;
   padding: 0.5rem 0.65rem;
   resize: vertical;
   transition: border-color 0.2s;
   min-height: 90px;
}

.adv-col-textarea:focus {
   outline: none;
   border-color: var(--accent);
}

.adv-mono {
   font-family: 'Courier New', monospace;
   font-size: 0.75rem;
   line-height: 1.5;
}

.adv-copy-btn {
   margin-left: auto;
   background: transparent;
   border: none;
   color: var(--text-muted);
   cursor: pointer;
   padding: 2px 5px;
   border-radius: 4px;
   font-size: 0.75rem;
   transition: all 0.2s;
}

.adv-copy-btn:hover {
   color: var(--accent-2);
   background: rgba(168, 85, 247, 0.1);
}

/* ── Asset Drop Zone ── */
.adv-asset-zone {
   margin-top: 0.6rem;
   border: 2px dashed rgba(255, 255, 255, 0.1);
   border-radius: 8px;
   min-height: 100px;
   position: relative;
   transition: all 0.3s;
   overflow: hidden;
}

.adv-asset-zone.adv-drag-over {
   border-color: var(--accent-2);
   background: rgba(168, 85, 247, 0.08);
   transform: scale(1.01);
}

.adv-asset-zone.adv-uploading {
   opacity: 0.6;
   pointer-events: none;
}

.adv-asset-zone.adv-zone-ready {
   border-color: rgba(16, 217, 160, 0.4);
   border-style: solid;
}

.adv-asset-empty {
   display: flex;
   flex-direction: column;
   align-items: center;
   justify-content: center;
   gap: 0.4rem;
   padding: 1rem 0.5rem;
   text-align: center;
}

.adv-asset-empty i {
   font-size: 1.4rem;
   color: var(--text-muted);
   opacity: 0.5;
}

.adv-asset-empty span {
   font-size: 0.72rem;
   color: var(--text-muted);
   line-height: 1.4;
}

.adv-upload-label {
   display: inline-block;
   padding: 0.3rem 0.75rem;
   background: rgba(124, 58, 237, 0.2);
   border: 1px solid rgba(124, 58, 237, 0.3);
   border-radius: 6px;
   font-size: 0.72rem;
   color: var(--accent-2);
   cursor: pointer;
   transition: all 0.2s;
   margin-top: 0.25rem;
}

.adv-upload-label:hover {
   background: rgba(124, 58, 237, 0.35);
}

/* Asset Preview */
.adv-asset-preview {
   display: flex;
   flex-direction: column;
   gap: 0.4rem;
   padding: 0.6rem;
}

.adv-asset-thumb-wrapper {
   position: relative;
   border-radius: 6px;
   overflow: hidden;
}

.adv-thumb {
   width: 100%;
   height: 90px;
   object-fit: cover;
   border-radius: 6px;
   display: block;
}

.adv-thumb-badge {
   position: absolute;
   bottom: 4px;
   right: 4px;
   background: rgba(0, 0, 0, 0.75);
   color: white;
   font-size: 0.6rem;
   font-weight: 700;
   padding: 2px 6px;
   border-radius: 4px;
   display: flex;
   align-items: center;
   gap: 3px;
}

.adv-asset-meta {
   font-size: 0.65rem;
   color: var(--text-muted);
   text-align: center;
}

.adv-asset-clear {
   background: rgba(239, 68, 68, 0.12);
   border: 1px solid rgba(239, 68, 68, 0.25);
   color: #ef4444;
   border-radius: 5px;
   cursor: pointer;
   font-size: 0.72rem;
   padding: 3px 8px;
   display: flex;
   align-items: center;
   gap: 4px;
   transition: all 0.2s;
   align-self: center;
}

.adv-asset-clear:hover {
   background: rgba(239, 68, 68, 0.25);
}

/* ── Export Progress ── */
.adv-export-bar-bg {
   height: 8px;
   background: rgba(255, 255, 255, 0.07);
   border-radius: 99px;
   overflow: hidden;
   margin-bottom: 0.4rem;
}

.adv-export-bar {
   height: 100%;
   width: 0%;
   background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-green));
   border-radius: 99px;
   transition: width 0.6s ease;
   background-size: 200% 100%;
   animation: shimmer-bar 2s infinite linear;
}

@keyframes shimmer-bar {
   0% {
      background-position: 200% 0;
   }

   100% {
      background-position: -200% 0;
   }
}

.adv-result-card {
   display: flex;
   flex-direction: column;
   align-items: center;
   gap: 0.75rem;
   padding: 1.5rem;
   background: rgba(16, 217, 160, 0.06);
   border: 1px solid rgba(16, 217, 160, 0.2);
   border-radius: var(--radius);
}

.adv-result-video {
   width: 100%;
   max-width: 360px;
   border-radius: var(--radius-sm);
   border: 1px solid rgba(16, 217, 160, 0.3);
}

/* ── Utilities ── */
.adv-hidden {
   display: none !important;
}

/* ── Toolbar de dos filas (Fase 3) ── */
.adv-phase3-toolbar {
   display: flex;
   flex-direction: column;
   gap: 0.6rem;
   padding: 0.85rem 1rem;
   background: rgba(0, 0, 0, 0.25);
   border-bottom: 1px solid var(--glass-border);
   position: sticky;
   top: 0;
   z-index: 10;
   backdrop-filter: blur(12px);
}

.adv-toolbar-row {
   display: flex;
   align-items: center;
   gap: 0.75rem;
   flex-wrap: wrap;
}

.adv-toolbar-row-2 {
   padding-top: 0.4rem;
   border-top: 1px solid rgba(255, 255, 255, 0.04);
}

/* ── Prompt Checks (Imagen / Video checkboxes) ── */
.adv-prompt-checks {
   display: flex;
   align-items: center;
   gap: 0.6rem;
   background: rgba(255, 255, 255, 0.04);
   border: 1px solid var(--glass-border);
   border-radius: 8px;
   padding: 0.4rem 0.8rem;
}

.adv-check-label {
   display: flex;
   align-items: center;
   gap: 0.4rem;
   font-size: 0.78rem;
   color: var(--text-dim);
   cursor: pointer;
   user-select: none;
   white-space: nowrap;
}

.adv-check-label input[type="checkbox"] {
   accent-color: var(--accent-2);
   width: 14px;
   height: 14px;
   cursor: pointer;
}

/* ── Botón Generar Imagen por escena ── */
.adv-img-action-row {
   display: flex;
   gap: 0.4rem;
   margin-top: 0.5rem;
}

.adv-regen-img-btn {
   display: inline-flex;
   align-items: center;
   gap: 0.35rem;
   padding: 0.35rem 0.75rem;
   background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(124, 58, 237, 0.1));
   border: 1px solid rgba(168, 85, 247, 0.3);
   border-radius: 6px;
   color: var(--accent-2);
   font-size: 0.75rem;
   font-weight: 600;
   cursor: pointer;
   transition: all 0.2s;
   white-space: nowrap;
}

.adv-regen-img-btn:hover:not(:disabled) {
   background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(124, 58, 237, 0.2));
   border-color: var(--accent-2);
   transform: translateY(-1px);
   box-shadow: 0 3px 12px rgba(168, 85, 247, 0.3);
}

.adv-regen-img-btn:disabled {
   opacity: 0.5;
   cursor: not-allowed;
   transform: none;
}

.adv-regen-small {
   padding: 0.35rem 0.5rem;
   font-size: 0.8rem;
}

/* ── Zona de preview de imagen generada por IA ── */
.adv-ai-img-zone {
   margin-top: 0.5rem;
   border-radius: 8px;
   overflow: hidden;
   border: 1px solid rgba(168, 85, 247, 0.25);
   background: rgba(168, 85, 247, 0.04);
   animation: fadeIn 0.3s ease;
}

.adv-ai-thumb {
   width: 100%;
   height: 130px;
   object-fit: cover;
   display: block;
   border-radius: 8px 8px 0 0;
}

.adv-ai-img-actions {
   display: flex;
   gap: 0.4rem;
   padding: 0.4rem;
   background: rgba(0, 0, 0, 0.3);
   justify-content: center;
}

.adv-use-asset-btn {
   display: inline-flex;
   align-items: center;
   gap: 0.35rem;
   padding: 0.3rem 0.75rem;
   background: linear-gradient(135deg, rgba(16, 217, 160, 0.15), rgba(6, 182, 212, 0.1));
   border: 1px solid rgba(16, 217, 160, 0.35);
   border-radius: 5px;
   color: var(--accent-green);
   font-size: 0.72rem;
   font-weight: 600;
   cursor: pointer;
   transition: all 0.2s;
   white-space: nowrap;
}

.adv-use-asset-btn:hover {
   background: linear-gradient(135deg, rgba(16, 217, 160, 0.3), rgba(6, 182, 212, 0.2));
   border-color: var(--accent-green);
   transform: translateY(-1px);
   box-shadow: 0 3px 10px rgba(16, 217, 160, 0.3);
}

/* ── Botón global "Generar Imagen (todas)" ── */
.adv-gen-img-all-btn {
   display: inline-flex;
   align-items: center;
   gap: 0.45rem;
   padding: 0.5rem 1.1rem;
   background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(168, 85, 247, 0.1));
   border: 1px solid rgba(245, 158, 11, 0.35);
   border-radius: 8px;
   color: var(--accent-amber);
   font-size: 0.82rem;
   font-weight: 600;
   cursor: pointer;
   transition: all 0.2s;
   white-space: nowrap;
}

.adv-gen-img-all-btn:hover:not(:disabled) {
   background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(168, 85, 247, 0.2));
   border-color: var(--accent-amber);
   transform: translateY(-1px);
   box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}

.adv-gen-img-all-btn:disabled {
   opacity: 0.5;
   cursor: not-allowed;
   transform: none;
}

/* ── Botón "Subir media (todas)" ── */
.adv-upload-all-btn {
   display: inline-flex;
   align-items: center;
   gap: 0.45rem;
   padding: 0.5rem 1.1rem;
   background: rgba(6, 182, 212, 0.1);
   border: 1px solid rgba(6, 182, 212, 0.3);
   border-radius: 8px;
   color: var(--accent-cyan);
   font-size: 0.82rem;
   font-weight: 600;
   cursor: pointer;
   transition: all 0.2s;
   white-space: nowrap;
}

.adv-upload-all-btn:hover {
   background: rgba(6, 182, 212, 0.2);
   border-color: var(--accent-cyan);
   transform: translateY(-1px);
   box-shadow: 0 4px 14px rgba(6, 182, 212, 0.25);
}

/* ── Responsive ── */
@media (max-width: 900px) {
   .adv-scene-vertical-layout {
      padding: 0.75rem;
   }

   .adv-board-body {
      padding: 1rem;
   }

   .adv-stepper {
      padding: 0.75rem 1rem;
   }

   .adv-toolbar-row {
      gap: 0.5rem;
   }

   .adv-gen-img-all-btn,
   .adv-upload-all-btn {
      font-size: 0.75rem;
      padding: 0.4rem 0.8rem;
   }
}

/* ============================================================
   HYBRID APP MOBILE RESPONSIVE DRAWER & LAYOUT (PRO MAX UX/UI)
   ============================================================ */

/* Botón Hamburguesa flotante (oculto en escritorio) */
.hamburger-btn {
   display: none;
   position: fixed;
   top: 10px;
   left: 10px;
   z-index: 10001;
   background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
   color: #fff;
   border: none;
   width: 42px;
   height: 42px;
   border-radius: 12px;
   font-size: 1.1rem;
   cursor: pointer;
   box-shadow: 0 4px 20px rgba(124, 58, 237, 0.5);
   align-items: center;
   justify-content: center;
   transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger-btn:active {
   transform: scale(0.92);
}

/* Sidebar Overlay Backdrop (Solo activo en móvil cuando el menú está abierto) */
.sidebar-overlay {
   display: none !important;
   position: fixed !important;
   inset: 0 !important;
   background: transparent !important;
   z-index: -1 !important;
   opacity: 0 !important;
   visibility: hidden !important;
   pointer-events: none !important;
}

@media (max-width: 768px) {

   /* 1. Botón hamburguesa visible en móvil */
   .hamburger-btn {
      display: flex !important;
   }

   .mobile-drawer-close-btn {
      display: flex !important;
   }

   /* 2. Sidebar transformado en Off-Canvas Drawer flotante POR ENCIMA DEL OVERLAY */
   .sidebar {
      position: fixed !important;
      top: 0 !important;
      left: 0 !important;
      bottom: 0 !important;
      width: 270px !important;
      max-width: 85vw !important;
      z-index: 10005 !important;
      transform: translateX(-100%) !important;
      box-shadow: 6px 0 35px rgba(0, 0, 0, 0.95) !important;
      background: #0f0f23 !important;
      border-right: 1px solid rgba(168, 85, 247, 0.4) !important;
      transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
      pointer-events: auto !important;
   }

   .sidebar .nav-links li,
   .sidebar .nav-links a {
      pointer-events: auto !important;
      cursor: pointer !important;
      position: relative !important;
      z-index: 10010 !important;
   }

   .sidebar.open {
      transform: translateX(0) !important;
   }

   /* 3. Overlay oscuro SOLO en móvil cuando el menú está abierto */
   .sidebar-overlay.active {
      display: block !important;
      background: rgba(0, 0, 0, 0.65) !important;
      z-index: 9999 !important;
      opacity: 1 !important;
      visibility: visible !important;
      pointer-events: auto !important;
   }

   /* 4. Workspace toma 100% de la pantalla sin margin izquierdo */
   .workspace {
      margin-left: 0 !important;
      width: 100% !important;
      max-width: 100vw !important;
      overflow-x: hidden !important;
   }

   /* 4. Topbar ajustada con espacio para el botón hamburguesa */
   .top-bar {
      padding: 0.8rem 1rem 0.8rem 3.8rem !important;
   }

   /* 5. Adaptación Pro Max para Cola de Vídeos en Móvil */
   #tab-queue {
      padding: 0.6rem 0.4rem !important;
      width: 100% !important;
      max-width: 100vw !important;
      overflow-x: hidden !important;
   }

   #nat-queue-cards-grid {
      grid-template-columns: 1fr !important;
      gap: 0.9rem !important;
   }

   .pro-queue-card {
      padding: 1rem !important;
      border-radius: 14px !important;
   }

   #nat-queue-table-container {
      height: calc(100vh - 230px) !important;
      max-height: calc(100vh - 230px) !important;
      width: 100% !important;
      max-width: 100% !important;
      overflow-x: auto !important;
      overflow-y: auto !important;
      -webkit-overflow-scrolling: touch !important;
      box-sizing: border-box !important;
   }
}

/* Ocultar barra de scroll nativa en pestañas de filtros */
#nat-queue-filter-tabs {
   scrollbar-width: none !important;
   -ms-overflow-style: none !important;
}

#nat-queue-filter-tabs::-webkit-scrollbar {
   display: none !important;
   width: 0 !important;
   height: 0 !important;
}

/* Forzar que el tab-queue contenga la tabla dentro del viewport */
#tab-queue {
   max-width: 100% !important;
   overflow-x: hidden !important;
   box-sizing: border-box !important;
}

@media (min-width: 769px) {
   .workspace {
      max-width: calc(100vw - var(--sidebar-width)) !important;
      overflow-x: hidden !important;
      box-sizing: border-box !important;
   }
}

/* Scrollbar dinámico (se activa automáticamente ante cualquier desbordamiento horizontal) */
#nat-queue-table-container,
.queue-table-wrap {
   scrollbar-width: thin !important;
   -ms-overflow-style: auto !important;
   overflow-x: auto !important;
   max-width: 100% !important;
   box-sizing: border-box !important;
}

#nat-queue-table-container::-webkit-scrollbar,
.queue-table-wrap::-webkit-scrollbar {
   height: 10px !important;
   width: 8px !important;
   display: block !important;
}

#nat-queue-table-container::-webkit-scrollbar-track,
.queue-table-wrap::-webkit-scrollbar-track {
   background: rgba(15, 15, 35, 0.95) !important;
   border-radius: 8px !important;
   border: 1px solid rgba(124, 58, 237, 0.2) !important;
}

#nat-queue-table-container::-webkit-scrollbar-thumb,
.queue-table-wrap::-webkit-scrollbar-thumb {
   background: linear-gradient(90deg, #7c3aed 0%, #a855f7 50%, #38bdf8 100%) !important;
   border-radius: 8px !important;
   border: 2px solid rgba(15, 15, 35, 0.9) !important;
   box-shadow: 0 0 10px rgba(124, 58, 237, 0.6) !important;
}

#nat-queue-table-container::-webkit-scrollbar-thumb:hover,
.queue-table-wrap::-webkit-scrollbar-thumb:hover {
   background: linear-gradient(90deg, #a855f7 0%, #ec4899 50%, #06b6d4 100%) !important;
}

#mobile-table-scroll-bar::-webkit-scrollbar-thumb {
   background: linear-gradient(90deg, #7c3aed 0%, #a855f7 50%, #38bdf8 100%) !important;
   border-radius: 6px;
   box-shadow: 0 0 10px rgba(124, 58, 237, 0.8);
}

/* ============================================================
   DEV SENIOR: SELECTOR DE CANALES & DELEGACIÓN REDES SOCIALES
   ============================================================ */
.proj-channel-dropdown {
   position: relative;
   width: 100%;
   user-select: none;
}

.proj-channel-dropdown summary {
   cursor: pointer;
   padding: 7px 12px;
   border-radius: 10px;
   background: rgba(18, 22, 38, 0.85);
   border: 1px solid rgba(124, 58, 237, 0.35);
   font-size: 0.78rem;
   list-style: none;
   display: flex;
   align-items: center;
   justify-content: space-between;
   color: #e2e8f0;
   backdrop-filter: blur(12px);
   box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
   transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.proj-channel-dropdown summary::-webkit-details-marker {
   display: none;
}

.proj-channel-dropdown summary:hover {
   border-color: rgba(168, 85, 247, 0.6);
   background: rgba(28, 32, 54, 0.95);
   box-shadow: 0 4px 14px rgba(124, 58, 237, 0.25);
}

.proj-channel-dropdown[open] summary {
   border-color: #a855f7;
   background: rgba(30, 27, 60, 0.95);
   box-shadow: 0 0 16px rgba(168, 85, 247, 0.35);
}

.proj-channel-dropdown-content {
   position: absolute;
   bottom: calc(100% + 6px);
   left: 0;
   right: 0;
   background: rgba(13, 15, 29, 0.96);
   border: 1px solid rgba(147, 51, 234, 0.45);
   border-radius: 14px;
   padding: 8px;
   box-shadow: 0 16px 36px rgba(0, 0, 0, 0.85), 0 0 25px rgba(124, 58, 237, 0.2);
   z-index: 999;
   max-height: 255px;
   overflow: hidden;
   display: flex;
   flex-direction: column;
   backdrop-filter: blur(25px);
   animation: dropdownSlideUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nat-acc-items-scroll,
.proj-channel-items-scroll {
   display: block !important;
   max-height: 165px !important;
   overflow-y: scroll !important;
   overflow-x: hidden !important;
   -webkit-overflow-scrolling: touch !important;
   touch-action: pan-y !important;
   overscroll-behavior: contain !important;
   scrollbar-width: thin !important;
   scrollbar-color: #a855f7 rgba(15, 15, 35, 0.85) !important;
   padding-right: 4px !important;
}

.nat-acc-items-scroll::-webkit-scrollbar,
.proj-channel-items-scroll::-webkit-scrollbar {
   width: 6px !important;
   display: block !important;
}

.nat-acc-items-scroll::-webkit-scrollbar-track,
.proj-channel-items-scroll::-webkit-scrollbar-track {
   background: rgba(15, 15, 35, 0.85) !important;
   border-radius: 6px !important;
}

.nat-acc-items-scroll::-webkit-scrollbar-thumb,
.proj-channel-items-scroll::-webkit-scrollbar-thumb {
   background: linear-gradient(180deg, #7c3aed 0%, #a855f7 50%, #38bdf8 100%) !important;
   border-radius: 6px !important;
   min-height: 28px !important;
}

@media (max-width: 768px) {
   .proj-channel-dropdown-content {
      position: relative !important;
      bottom: auto !important;
      top: auto !important;
      margin-top: 6px !important;
      max-height: 255px !important;
      overflow: hidden !important;
   }
   .nat-acc-dropdown-menu {
      max-height: 270px !important;
      overflow: hidden !important;
   }
   .nat-acc-items-scroll,
   .proj-channel-items-scroll {
      max-height: 155px !important;
      overflow-y: scroll !important;
   }
}

@keyframes dropdownSlideUp {
   from {
      opacity: 0;
      transform: translateY(6px) scale(0.98);
   }
   to {
      opacity: 1;
      transform: translateY(0) scale(1);
   }
}

.channel-option-item {
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 10px;
   padding: 7px 10px;
   margin-bottom: 4px;
   flex-shrink: 0;
   border-radius: 9px;
   cursor: pointer;
   font-size: 0.78rem;
   color: #f1f5f9;
   background: rgba(255, 255, 255, 0.02);
   border: 1px solid rgba(255, 255, 255, 0.04);
   transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.channel-option-item:hover {
   background: rgba(124, 58, 237, 0.18);
   border-color: rgba(168, 85, 247, 0.35);
   transform: translateX(2px);
}

.channel-option-item.selected {
   background: rgba(16, 185, 129, 0.12);
   border-color: rgba(16, 185, 129, 0.35);
}

/* Icono de manos para cuentas delegadas (sin texto "Delegado" para dejar ver el nombre del canal) */
.delegated-account-badge {
   display: none !important;
}

.delegated-hand-icon {
   font-size: 13px;
   line-height: 1;
   margin-left: auto;
   flex-shrink: 0;
   cursor: help;
   filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.4));
   transition: transform 0.2s ease;
   user-select: none;
}

.delegated-hand-icon:hover {
   transform: scale(1.25);
}

/* ==========================================================================
   ✨ ULTRA-PREMIUM SCI-FI AUDIO & VIDEO PROCESSING OVERLAY (2026 EDITION)
   ========================================================================== */
.audio-upload-processing-overlay {
   position: relative;
   background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 27, 75, 0.95) 50%, rgba(15, 23, 42, 0.95) 100%);
   border-radius: 14px;
   padding: 16px;
   margin-bottom: 12px;
   border: 1px solid rgba(168, 85, 247, 0.4);
   box-shadow: 0 0 25px rgba(168, 85, 247, 0.25), inset 0 0 15px rgba(56, 189, 248, 0.15);
   backdrop-filter: blur(16px);
   overflow: hidden;
   display: flex;
   flex-direction: column;
   align-items: center;
   justify-content: center;
   gap: 12px;
   animation: audioCardEnter 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.audio-upload-processing-overlay::before {
   content: '';
   position: absolute;
   inset: -50%;
   background: conic-gradient(from 0deg, transparent, #38bdf8, #818cf8, #c084fc, #ec4899, transparent 60%);
   animation: audioConicLaser 3.5s linear infinite;
   opacity: 0.35;
   pointer-events: none;
}

.audio-upload-processing-overlay::after {
   content: '';
   position: absolute;
   inset: 2px;
   background: linear-gradient(135deg, rgba(10, 14, 29, 0.94), rgba(24, 18, 54, 0.92));
   border-radius: 12px;
   z-index: 1;
}

.audio-upload-content-inner {
   position: relative;
   z-index: 2;
   display: flex;
   flex-direction: column;
   align-items: center;
   width: 100%;
   text-align: center;
   gap: 10px;
}

/* Equalizer Bars Container */
.cyber-equalizer {
   display: flex;
   align-items: flex-end;
   justify-content: center;
   gap: 4px;
   height: 38px;
   padding: 4px 8px;
   background: rgba(0, 0, 0, 0.4);
   border-radius: 20px;
   border: 1px solid rgba(56, 189, 248, 0.3);
   box-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
}

.cyber-eq-bar {
   width: 4.5px;
   border-radius: 3px;
   background: linear-gradient(180deg, #ec4899 0%, #a855f7 40%, #38bdf8 100%);
   box-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
   animation: cyberEqualizerWave 1.2s ease-in-out infinite alternate;
}

.cyber-eq-bar:nth-child(1) { height: 35%; animation-delay: 0.1s; animation-duration: 0.8s; }
.cyber-eq-bar:nth-child(2) { height: 65%; animation-delay: 0.3s; animation-duration: 1.1s; }
.cyber-eq-bar:nth-child(3) { height: 95%; animation-delay: 0.05s; animation-duration: 0.75s; }
.cyber-eq-bar:nth-child(4) { height: 45%; animation-delay: 0.4s; animation-duration: 0.95s; }
.cyber-eq-bar:nth-child(5) { height: 80%; animation-delay: 0.2s; animation-duration: 1.05s; }
.cyber-eq-bar:nth-child(6) { height: 100%; animation-delay: 0.5s; animation-duration: 0.85s; }
.cyber-eq-bar:nth-child(7) { height: 55%; animation-delay: 0.15s; animation-duration: 1.2s; }
.cyber-eq-bar:nth-child(8) { height: 75%; animation-delay: 0.35s; animation-duration: 0.9s; }
.cyber-eq-bar:nth-child(9) { height: 40%; animation-delay: 0.25s; animation-duration: 1.15s; }

/* Glowing Pulse Status Badge */
.audio-status-pill {
   display: inline-flex;
   align-items: center;
   gap: 6px;
   padding: 4px 12px;
   border-radius: 9999px;
   background: rgba(139, 92, 246, 0.2);
   border: 1px solid rgba(139, 92, 246, 0.45);
   color: #c084fc;
   font-size: 10px;
   font-weight: 800;
   letter-spacing: 0.5px;
   text-transform: uppercase;
   box-shadow: 0 0 10px rgba(168, 85, 247, 0.3);
   animation: audioPulseGlow 1.5s ease-in-out infinite alternate;
}

.audio-status-title {
   font-size: 12.5px;
   font-weight: 800;
   background: linear-gradient(135deg, #ffffff 0%, #38bdf8 50%, #c084fc 100%);
   -webkit-background-clip: text;
   -webkit-text-fill-color: transparent;
   letter-spacing: 0.3px;
}

.audio-status-desc {
   font-size: 10px;
   color: #94a3b8;
   line-height: 1.4;
   max-width: 90%;
}

/* Shimmer Progress Track */
.audio-shimmer-track {
   width: 85%;
   height: 4px;
   background: rgba(255, 255, 255, 0.08);
   border-radius: 999px;
   overflow: hidden;
   position: relative;
}

.audio-shimmer-bar {
   width: 100%;
   height: 100%;
   background: linear-gradient(90deg, #38bdf8, #c084fc, #ec4899, #38bdf8);
   background-size: 200% 100%;
   animation: audioShimmerSweep 1.5s linear infinite;
   border-radius: 999px;
}

/* Success Highlighting Effect on First Track */
.new-uploaded-music-highlight {
   animation: musicUploadHighlightSuccess 2.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes audioCardEnter {
   from { opacity: 0; transform: translateY(-8px) scale(0.97); }
   to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes audioConicLaser {
   100% { transform: rotate(360deg); }
}

@keyframes cyberEqualizerWave {
   0% { height: 15%; }
   50% { height: 95%; }
   100% { height: 35%; }
}

@keyframes audioPulseGlow {
   from { box-shadow: 0 0 6px rgba(168, 85, 247, 0.2); }
   to { box-shadow: 0 0 16px rgba(168, 85, 247, 0.6); }
}

@keyframes audioShimmerSweep {
   0% { background-position: 200% 0; }
   100% { background-position: -200% 0; }
}

@keyframes musicUploadHighlightSuccess {
   0% {
      background: rgba(16, 185, 129, 0.45) !important;
      border-color: #10b981 !important;
      box-shadow: 0 0 20px rgba(16, 185, 129, 0.6) !important;
      transform: scale(1.02);
   }
   70% {
      background: rgba(16, 185, 129, 0.25) !important;
      border-color: #10b981 !important;
      box-shadow: 0 0 10px rgba(16, 185, 129, 0.3) !important;
      transform: scale(1);
   }
   100% {
      background: rgba(124, 58, 237, 0.25) !important;
      border-color: #a78bfa !important;
      box-shadow: none !important;
      transform: scale(1);
   }
}

/* ==========================================================================
   📱 MOBILE & MODERN APP BOTTOM NAVIGATION BAR (5 CORE BUTTONS)
   ========================================================================== */
.mobile-bottom-nav {
   position: fixed;
   bottom: 12px;
   left: 50%;
   transform: translateX(-50%);
   width: calc(100% - 24px);
   max-width: 520px;
   height: 64px;
   background: rgba(13, 17, 28, 0.88);
   backdrop-filter: blur(25px);
   -webkit-backdrop-filter: blur(25px);
   border: 1px solid rgba(124, 58, 237, 0.35);
   border-radius: 20px;
   display: none;
   align-items: center;
   justify-content: space-around;
   padding: 0 6px;
   z-index: 99999;
   box-shadow: 0 12px 35px rgba(0, 0, 0, 0.65), 0 0 20px rgba(124, 58, 237, 0.2);
   transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 768px) {
   .mobile-bottom-nav {
      display: flex;
   }
}

.mobile-bottom-nav-item {
   flex: 1;
   display: flex;
   flex-direction: column;
   align-items: center;
   justify-content: center;
   gap: 4px;
   background: none;
   border: none;
   color: #8fa0c2;
   cursor: pointer;
   padding: 8px 4px;
   border-radius: 14px;
   position: relative;
   transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
   outline: none;
   user-select: none;
   -webkit-tap-highlight-color: transparent;
}

.mobile-bottom-nav-item .nav-icon-wrapper {
   position: relative;
   width: 32px;
   height: 26px;
   display: flex;
   align-items: center;
   justify-content: center;
   font-size: 1.15rem;
   transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
}

.mobile-bottom-nav-item .nav-label {
   font-size: 0.72rem;
   font-weight: 600;
   letter-spacing: -0.01em;
   transition: color 0.2s ease, transform 0.2s ease;
   line-height: 1;
}

.mobile-bottom-nav-item:hover {
   color: #dde4f0;
}

.mobile-bottom-nav-item:active {
   transform: scale(0.92);
}

.mobile-bottom-nav-item.active {
   color: #fff;
}

.mobile-bottom-nav-item.active .nav-icon-wrapper {
   transform: translateY(-2px);
   color: #38bdf8;
   filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.75));
}

.mobile-bottom-nav-item.active .nav-label {
   color: #fff;
   font-weight: 700;
}

.mobile-bottom-nav-item.active::after {
   content: '';
   position: absolute;
   bottom: 4px;
   width: 16px;
   height: 3px;
   border-radius: 99px;
   background: linear-gradient(90deg, #7c3aed, #38bdf8);
   box-shadow: 0 0 8px rgba(56, 189, 248, 0.8);
}

.bottom-nav-badge {
   position: absolute;
   top: -4px;
   right: -4px;
   background: linear-gradient(135deg, #ef4444, #f43f5e);
   color: #fff;
   font-size: 0.65rem;
   font-weight: 800;
   padding: 1px 5px;
   border-radius: 10px;
   border: 1.5px solid #0d111c;
   box-shadow: 0 2px 6px rgba(239, 68, 68, 0.5);
   line-height: 1.2;
}

/* ==========================================================================
   📱 MOBILE-APP STYLE SECTIONS: MI PERFIL & CONFIGURACIÓN
   ========================================================================== */
.mobile-app-layout {
   max-width: 720px;
   margin: 0 auto;
   display: flex;
   flex-direction: column;
   gap: 1.4rem;
   padding: 0.5rem 0.2rem 5rem 0.2rem;
}

/* Top App Header */
.mobile-app-header {
   display: flex;
   align-items: center;
   justify-content: space-between;
   padding: 0.5rem 0.2rem;
}

.mobile-app-header h2 {
   font-size: 1.5rem;
   font-weight: 800;
   color: #fff;
   display: flex;
   align-items: center;
   gap: 10px;
   letter-spacing: -0.02em;
}

.mobile-app-header-desc {
   font-size: 0.84rem;
   color: var(--text-muted);
   margin-top: 2px;
}

/* Hero Profile Card */
.mobile-profile-hero {
   position: relative;
   background: linear-gradient(135deg, rgba(28, 22, 58, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
   border-radius: 20px;
   border: 1px solid rgba(124, 58, 237, 0.35);
   box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4), 0 0 25px rgba(124, 58, 237, 0.15);
   padding: 1.6rem 1.4rem;
   overflow: hidden;
   backdrop-filter: blur(20px);
}

.mobile-profile-hero::before {
   content: '';
   position: absolute;
   top: 0;
   left: 0;
   right: 0;
   height: 4px;
   background: linear-gradient(90deg, #7c3aed, #38bdf8, #ec4899);
}

.mobile-profile-hero-content {
   display: flex;
   align-items: center;
   gap: 1.2rem;
   flex-wrap: wrap;
}

.mobile-avatar-wrap {
   position: relative;
   flex-shrink: 0;
}

.mobile-avatar-img {
   width: 76px;
   height: 76px;
   border-radius: 50%;
   border: 3px solid #7c3aed;
   box-shadow: 0 0 20px rgba(124, 58, 237, 0.4);
   object-fit: cover;
}

.mobile-avatar-badge {
   position: absolute;
   bottom: 0;
   right: 0;
   width: 24px;
   height: 24px;
   background: #fff;
   border-radius: 50%;
   padding: 3px;
   box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.mobile-profile-info {
   flex: 1;
   min-width: 200px;
}

.mobile-profile-name-row {
   display: flex;
   align-items: center;
   gap: 8px;
   flex-wrap: wrap;
   margin-bottom: 4px;
}

.mobile-profile-name {
   font-size: 1.35rem;
   font-weight: 800;
   color: #fff;
   letter-spacing: -0.02em;
}

.mobile-profile-email-chip {
   display: inline-flex;
   align-items: center;
   gap: 6px;
   font-size: 0.85rem;
   color: #38bdf8;
   background: rgba(56, 189, 248, 0.1);
   border: 1px solid rgba(56, 189, 248, 0.25);
   padding: 4px 10px;
   border-radius: 20px;
   font-weight: 600;
   margin-top: 4px;
}

/* Metric Stats Grid */
.mobile-stats-grid {
   display: grid;
   grid-template-columns: repeat(3, 1fr);
   gap: 10px;
}

.mobile-stat-card {
   background: rgba(18, 24, 38, 0.75);
   border: 1px solid rgba(255, 255, 255, 0.08);
   border-radius: 16px;
   padding: 1rem 0.8rem;
   text-align: center;
   display: flex;
   flex-direction: column;
   align-items: center;
   gap: 4px;
   transition: transform 0.2s ease, border-color 0.2s ease;
}

.mobile-stat-card:hover {
   transform: translateY(-2px);
   border-color: rgba(124, 58, 237, 0.4);
}

.mobile-stat-icon {
   font-size: 1.25rem;
   margin-bottom: 2px;
}

.mobile-stat-value {
   font-size: 1.25rem;
   font-weight: 800;
   color: #fff;
   letter-spacing: -0.02em;
}

.mobile-stat-label {
   font-size: 0.7rem;
   font-weight: 600;
   color: var(--text-muted);
   text-transform: uppercase;
   letter-spacing: 0.04em;
}

/* iOS-style Grouped Settings Cards */
.mobile-group-card {
   background: rgba(18, 24, 38, 0.75);
   border: 1px solid rgba(255, 255, 255, 0.08);
   border-radius: 18px;
   overflow: hidden;
   box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.mobile-group-header {
   padding: 1rem 1.2rem 0.6rem 1.2rem;
   font-size: 0.75rem;
   font-weight: 700;
   text-transform: uppercase;
   letter-spacing: 0.06em;
   color: #a78bfa;
   display: flex;
   align-items: center;
   justify-content: space-between;
}

.mobile-setting-row {
   display: flex;
   align-items: center;
   justify-content: space-between;
   padding: 0.95rem 1.2rem;
   border-top: 1px solid rgba(255, 255, 255, 0.05);
   gap: 12px;
   transition: background 0.15s ease;
}

.mobile-setting-row:first-of-type {
   border-top: none;
}

.mobile-setting-row.interactive:hover {
   background: rgba(255, 255, 255, 0.03);
   cursor: pointer;
}

.mobile-setting-left {
   display: flex;
   align-items: center;
   gap: 12px;
   flex: 1;
   min-width: 0;
}

.mobile-setting-icon-box {
   width: 36px;
   height: 36px;
   border-radius: 10px;
   display: flex;
   align-items: center;
   justify-content: center;
   font-size: 1rem;
   flex-shrink: 0;
}

.mobile-setting-text {
   display: flex;
   flex-direction: column;
   min-width: 0;
}

.mobile-setting-title {
   font-size: 0.9rem;
   font-weight: 600;
   color: #fff;
}

.mobile-setting-subtitle {
   font-size: 0.75rem;
   color: var(--text-muted);
}

.mobile-setting-right {
   display: flex;
   align-items: center;
   gap: 8px;
   flex-shrink: 0;
}

/* Mobile Segmented Tabs Bar (Settings) */
.mobile-segmented-control {
   display: flex;
   background: rgba(10, 14, 24, 0.7);
   border: 1px solid rgba(255, 255, 255, 0.08);
   border-radius: 14px;
   padding: 4px;
   gap: 4px;
   margin-bottom: 1.2rem;
}

.mobile-segment-btn {
   flex: 1;
   padding: 8px 12px;
   border: none;
   background: transparent;
   color: var(--text-muted);
   font-size: 0.82rem;
   font-weight: 600;
   border-radius: 10px;
   cursor: pointer;
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 6px;
   transition: all 0.2s ease;
   white-space: nowrap;
}

.mobile-segment-btn.active {
   background: linear-gradient(135deg, #7c3aed 0%, #38bdf8 100%);
   color: #fff;
   font-weight: 700;
   box-shadow: 0 4px 15px rgba(124, 58, 237, 0.35);
}

/* Mobile Settings Input Card */
.mobile-input-card {
   background: rgba(18, 24, 38, 0.75);
   border: 1px solid rgba(255, 255, 255, 0.08);
   border-radius: 16px;
   padding: 1.2rem;
   display: flex;
   flex-direction: column;
   gap: 0.8rem;
   box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.mobile-input-header {
   display: flex;
   align-items: center;
   justify-content: space-between;
}

.mobile-input-title {
   font-size: 0.9rem;
   font-weight: 700;
   color: #fff;
   display: flex;
   align-items: center;
   gap: 8px;
}

.mobile-pill-status {
   font-size: 0.72rem;
   font-weight: 700;
   padding: 3px 9px;
   border-radius: 20px;
}

/* Mobile Action Button */
.mobile-action-btn-primary {
   width: 100%;
   padding: 0.9rem;
   border-radius: 14px;
   border: none;
   background: linear-gradient(135deg, #7c3aed 0%, #38bdf8 100%);
   color: #fff;
   font-size: 0.95rem;
   font-weight: 700;
   cursor: pointer;
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 8px;
   box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
   transition: transform 0.15s ease, opacity 0.15s ease;
}

.mobile-action-btn-primary:active {
   transform: scale(0.98);
}

.mobile-action-btn-danger {
   width: 100%;
   padding: 0.85rem;
   border-radius: 14px;
   border: 1px solid rgba(239, 68, 68, 0.35);
   background: rgba(239, 68, 68, 0.12);
   color: #ef4444;
   font-size: 0.92rem;
   font-weight: 700;
   cursor: pointer;
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 8px;
   transition: all 0.2s ease;
}

.mobile-action-btn-danger:hover {
   background: rgba(239, 68, 68, 0.22);
}

/* Responsive workspace padding for bottom nav */
@media (max-width: 900px) {
   .workspace {
      padding-bottom: 85px !important;
   }
   .mobile-stats-grid {
      grid-template-columns: repeat(3, 1fr);
   }
}

@media (max-width: 600px) {
   .mobile-stats-grid {
      grid-template-columns: 1fr;
      gap: 8px;
   }
   .mobile-stat-card {
      flex-direction: row;
      justify-content: space-between;
      padding: 0.8rem 1rem;
   }
   .mobile-bottom-nav {
      bottom: 8px;
      height: 60px;
      border-radius: 16px;
   }
}



/* =========================================================================
   CREAR MEDIANTE LA EXTENSIÓN (MOBILE-FIRST REMOTE CONTROL + DICTADO VOZ)
   ========================================================================= */
.create-modes-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 10px;
    margin-bottom: 1.25rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.create-mode-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.85rem;
    white-space: nowrap;
}

.ext-tab-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.ext-tab-dot.online {
    background: #10d9a0;
    box-shadow: 0 0 8px #10d9a0;
}

.ext-tab-dot.offline {
    background: rgba(255, 255, 255, 0.25);
}

.ext-bridge-card {
    background: linear-gradient(145deg, rgba(124, 58, 237, 0.12), rgba(15, 23, 42, 0.78));
    border: 1px solid rgba(168, 85, 247, 0.28);
    border-radius: 14px;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
}

.ext-bridge-card.is-online {
    border-color: rgba(16, 217, 160, 0.45);
    background: linear-gradient(145deg, rgba(16, 217, 160, 0.1), rgba(15, 23, 42, 0.8));
}

.ext-bridge-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.ext-bridge-status-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.ext-pulse-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    flex-shrink: 0;
    background: #f59e0b;
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.55);
}

.ext-pulse-dot.online {
    background: #10d9a0;
    animation: extPulseGreen 1.8s infinite;
}

.ext-pulse-dot.offline {
    background: #f59e0b;
}

@keyframes extPulseGreen {
    0% { box-shadow: 0 0 0 0 rgba(16, 217, 160, 0.65); }
    70% { box-shadow: 0 0 0 9px rgba(16, 217, 160, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 217, 160, 0); }
}

.ext-bridge-title {
    font-size: 0.86rem;
    font-weight: 700;
    color: #f8fafc;
    line-height: 1.25;
}

.ext-bridge-sub {
    font-size: 0.74rem;
    color: var(--text-muted);
    margin-top: 2px;
    line-height: 1.3;
}

.ext-link-toggle-btn {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #e2e8f0;
    border-radius: 9px;
    padding: 6px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.ext-link-toggle-btn:hover {
    border-color: #a855f7;
    background: rgba(168, 85, 247, 0.18);
}

.ext-caps-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 0.65rem;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.ext-cap-pill {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.ext-cap-pill.ready {
    background: rgba(16, 217, 160, 0.14);
    color: #34d399;
    border-color: rgba(16, 217, 160, 0.35);
}

.ext-link-drawer {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed rgba(255, 255, 255, 0.14);
}

.ext-drawer-help {
    font-size: 0.76rem;
    color: #cbd5e1;
    line-height: 1.45;
    margin: 0 0 0.6rem 0;
}

.ext-key-action-row {
    display: flex;
    gap: 6px;
    align-items: center;
}

.ext-key-action-row input {
    flex: 1;
    font-family: monospace;
    font-size: 0.78rem;
}

.ext-prompt-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 0.45rem;
    flex-wrap: wrap;
}

.ext-autosend-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.73rem;
    font-weight: 600;
    color: #d8b4fe;
    background: rgba(168, 85, 247, 0.14);
    border: 1px solid rgba(168, 85, 247, 0.3);
    padding: 3px 9px;
    border-radius: 999px;
    cursor: pointer;
    user-select: none;
}

.ext-autosend-pill input {
    accent-color: #a855f7;
    margin: 0;
}

.ext-textarea-wrap {
    position: relative;
}

.ext-prompt-textarea {
    padding-bottom: 3rem !important;
    min-height: 112px;
    line-height: 1.45;
}

.ext-mic-fab {
    position: absolute;
    right: 10px;
    bottom: 10px;
    border: none;
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.45);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.ext-mic-fab:active {
    transform: scale(0.95);
}

.ext-mic-fab.recording {
    background: linear-gradient(135deg, #ef4444, #f97316);
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.25);
    animation: extMicPulse 1.1s infinite;
}

@keyframes extMicPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.ext-voice-live-banner {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.13);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fecaca;
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ext-voice-waves {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    height: 16px;
}

.ext-voice-waves span {
    width: 3px;
    height: 100%;
    background: #f87171;
    border-radius: 3px;
    animation: extWaveAnim 0.8s ease-in-out infinite;
}
.ext-voice-waves span:nth-child(2) { animation-delay: 0.15s; }
.ext-voice-waves span:nth-child(3) { animation-delay: 0.3s; }
.ext-voice-waves span:nth-child(4) { animation-delay: 0.45s; }
.ext-voice-waves span:nth-child(5) { animation-delay: 0.6s; }

@keyframes extWaveAnim {
    0%, 100% { transform: scaleY(0.35); }
    50% { transform: scaleY(1); }
}

.ext-quick-chips {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 8px 0 2px 0;
    scrollbar-width: none;
}
.ext-quick-chips::-webkit-scrollbar {
    display: none;
}

.ext-idea-chip {
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.11);
    background: rgba(255, 255, 255, 0.04);
    color: #cbd5e1;
    border-radius: 999px;
    padding: 5px 11px;
    font-size: 0.73rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
}

.ext-idea-chip:hover,
.ext-idea-chip:active {
    background: rgba(168, 85, 247, 0.18);
    border-color: #a855f7;
    color: #fff;
}

.ext-mobile-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
}

.ext-toggles-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0.35rem 0 0.75rem 0;
}

.ext-advanced-details {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 0.65rem 0.85rem;
    margin-bottom: 1rem;
}

.ext-advanced-details summary {
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    user-select: none;
}

.ext-advanced-body {
    margin-top: 0.75rem;
}

.ext-live-telemetry-box {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 0.9rem;
    padding: 0.6rem;
    border-radius: 11px;
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.28);
}

.ext-tel-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.65);
    border-radius: 8px;
    padding: 6px 4px;
    text-align: center;
}

.ext-tel-label {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.ext-tel-chip strong {
    font-size: 0.9rem;
    color: #fde047;
    margin-top: 2px;
}

@media (max-width: 640px) {
    .create-modes-tabs {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 4px;
        padding: 4px;
    }
    .create-mode-btn {
        border-radius: 8px !important;
        padding: 0.65rem 0.5rem !important;
        font-size: 0.8rem;
    }
    .ext-mobile-grid-2 {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }
    .ext-key-action-row {
        flex-wrap: wrap;
    }
}

/* =========================================================================
   JAYMAKER 2026 PRO MAX — CLON 1:1 INPUT PROMPT CONTAINER & MODALES EXTENSIÓN
   ========================================================================= */

.jm-composer-container {
    background: rgba(45, 45, 50, 0.65) !important;
    backdrop-filter: blur(50px) saturate(1.2) !important;
    -webkit-backdrop-filter: blur(50px) saturate(1.2) !important;
    border-radius: 24px !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    padding: 10px 12px 9px 12px !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 30px rgba(0, 0, 0, 0.45) !important;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 7px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.jm-composer-container:focus-within,
.jm-composer-container.drag-over {
    border-color: rgba(168, 85, 247, 0.5) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 12px 36px rgba(124, 58, 237, 0.28) !important;
}

.extc-attached-preview-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 4px 2px 10px 2px;
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Clon 1:1 de tarjetas de adjuntos y descarga de URL de la Extensión */
@keyframes extcAttachPopIn {
    0% { opacity: 0; transform: scale(0.86); }
    100% { opacity: 1; transform: scale(1); }
}

.extc-attached-preview-strip .gemini-img-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 12px;
    overflow: hidden;
    border: 1.5px solid rgba(139, 92, 246, 0.42);
    background: rgba(15, 23, 42, 0.92);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    flex-shrink: 0;
    animation: extcAttachPopIn 0.2s cubic-bezier(0.22, 1, 0.36, 1);
    transition: transform 0.18s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.extc-attached-preview-strip .gemini-img-wrapper:hover {
    transform: translateY(-1px);
    border-color: rgba(168, 85, 247, 0.8);
}

.extc-attached-preview-strip .gemini-img-wrapper img,
.extc-attached-preview-strip .gemini-img-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.extc-attached-preview-strip .gemini-img-wrapper.is-downloading-url {
    border: 1.5px solid rgba(56, 189, 248, 0.85) !important;
    background: radial-gradient(circle at 50% 30%, rgba(56, 189, 248, 0.22), rgba(9, 13, 24, 0.96)) !important;
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.32) !important;
    flex-direction: column;
}

.extc-attached-preview-strip .gemini-img-wrapper.is-error-url {
    border: 1.5px solid rgba(248, 113, 113, 0.85) !important;
    background: rgba(30, 10, 15, 0.95) !important;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.22) !important;
}

.extc-attached-preview-strip .wf-attached-dl-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 100%;
    height: 100%;
    padding: 2px;
    text-align: center;
}

.extc-attached-preview-strip .attached-circular-progress-wrap {
    position: relative;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.extc-attached-preview-strip .attached-circular-svg {
    width: 36px;
    height: 36px;
    transform: rotate(-90deg);
}

.extc-attached-preview-strip .attached-circular-bg {
    fill: none;
    stroke: rgba(15, 23, 42, 0.85);
    stroke-width: 3.4;
}

.extc-attached-preview-strip .attached-circular-bar {
    fill: none;
    stroke: #38bdf8;
    stroke-width: 3.4;
    stroke-linecap: round;
    transition: stroke-dasharray 0.3s ease;
    filter: drop-shadow(0 0 4px rgba(56, 189, 248, 0.55));
}

.extc-attached-preview-strip .attached-circular-pct-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 900;
    color: #f8fafc;
    letter-spacing: -0.3px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
    pointer-events: none;
}

.extc-attached-preview-strip .wf-attached-dur-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    padding: 1px 4px;
    border-radius: 4px;
    background: rgba(2, 6, 23, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #f8fafc;
    font-size: 8px;
    font-weight: 800;
    line-height: 1.1;
    pointer-events: none;
    z-index: 4;
}

.extc-attached-preview-strip .wf-attached-link-badge {
    position: absolute;
    bottom: 2px;
    left: 2px;
    width: 15px;
    height: 15px;
    border-radius: 4px;
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(56, 189, 248, 0.65);
    color: #7dd3fc !important;
    text-decoration: none !important;
    font-size: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: background 0.15s ease, color 0.15s ease;
}

.extc-attached-preview-strip .wf-attached-link-badge:hover {
    background: #38bdf8;
    color: #020617 !important;
}

.extc-attached-preview-strip .wf-attached-retry-btn {
    background: rgba(239, 68, 68, 0.25);
    border: 1px solid rgba(248, 113, 113, 0.6);
    color: #fecaca;
    border-radius: 4px;
    font-size: 8px;
    font-weight: 800;
    padding: 1px 4px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.extc-attached-preview-strip .wf-attached-retry-btn:hover {
    background: rgba(239, 68, 68, 0.5);
}

.extc-attached-preview-strip .wf-attached-remove-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    background: rgba(0, 0, 0, 0.78);
    border: none;
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    font-size: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    z-index: 6;
    transition: background 0.15s ease, transform 0.15s ease;
}

.extc-attached-preview-strip .wf-attached-remove-btn:hover {
    background: #ef4444;
    transform: scale(1.08);
}

.extc-attached-item {
    position: relative;
    width: 54px;
    height: 54px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(168, 85, 247, 0.45);
    background: rgba(15, 23, 42, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.extc-attached-item img,
.extc-attached-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.extc-attached-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.78);
    border: none;
    color: #fff;
    font-size: 10px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.extc-attached-remove:hover {
    background: #ef4444;
}

/* Serie Active HUD */
.serie-active-project-hud {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.14), rgba(168, 85, 247, 0.16));
    border: 1px solid rgba(236, 72, 153, 0.4);
}

.serie-hud-left,
.serie-hud-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.serie-hud-badge {
    font-size: 9.5px;
    font-weight: 800;
    color: #f472b6;
    background: rgba(236, 72, 153, 0.18);
    padding: 2px 6px;
    border-radius: 6px;
}

.serie-hud-title {
    font-size: 11px;
    font-weight: 700;
    color: #f8fafc;
}

.serie-hud-tag {
    font-size: 10px;
    color: #c084fc;
    font-weight: 600;
}

.serie-hud-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #e2e8f0;
    border-radius: 7px;
    padding: 2px 7px;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
}

.serie-hud-btn:hover {
    background: rgba(168, 85, 247, 0.25);
    border-color: rgba(168, 85, 247, 0.5);
}

.serie-hud-btn.close-btn:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.5);
    color: #fca5a5;
}

/* Composer Body & 4 Left Square Tiles */
.jm-composer-body {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
}

.jm-tiles-bar {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.jm-tile-btn {
    width: 58px;
    min-width: 58px;
    max-width: 58px;
    height: 58px;
    background: rgba(59, 59, 59, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 12px;
    padding: 5px 6px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    text-align: left;
}

.jm-tile-btn:hover {
    background: rgba(71, 71, 71, 0.92);
    border-color: rgba(168, 85, 247, 0.5);
    transform: translateY(-1.5px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), 0 0 10px rgba(168, 85, 247, 0.22);
}

.jm-tile-btn:active {
    transform: translateY(0) scale(0.96);
}

.jm-tile-svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.jm-tile-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    width: 100%;
    overflow: hidden;
}

.jm-tile-label {
    font-size: 10px;
    font-weight: 700;
    color: #f1f5f9;
    line-height: 12px;
}

.jm-tile-sub {
    font-size: 8.5px;
    font-weight: 500;
    color: #94a3b8;
    line-height: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.jm-input-wrapper {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gemini-input-area textarea#ext-prompt {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #f8fafc !important;
    font-size: 13px !important;
    line-height: 1.45 !important;
    padding: 4px 28px 4px 6px !important;
    min-height: 54px !important;
    max-height: 170px !important;
    height: 54px;
    width: 100%;
    resize: none !important;
    outline: none !important;
    font-family: inherit;
    overflow-y: auto;
    transition: height 0.15s ease;
}

.gemini-input-area textarea#ext-prompt::placeholder {
    color: rgba(255, 255, 255, 0.45) !important;
    font-size: 12.5px !important;
}

.gemini-input-area.expanded textarea#ext-prompt {
    height: 220px !important;
    max-height: 360px !important;
}

.gemini-expand-btn:hover {
    color: #ffffff !important;
    transform: scale(1.15);
}

/* Manual JSON Badge */
.manual-json-badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(139, 92, 246, 0.14) 100%);
    border: 1px solid rgba(245, 158, 11, 0.42);
    border-radius: 8px;
    padding: 5px 10px;
    margin-top: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25), 0 0 8px rgba(245, 158, 11, 0.15);
}

.manual-json-badge-content {
    display: flex;
    align-items: center;
    gap: 7px;
}

.manual-json-badge-icon {
    font-size: 13px;
    color: #fbbf24;
}

.manual-json-badge-text {
    font-size: 11px;
    color: #e2e8f0;
    font-weight: 600;
}

.manual-json-badge-text strong {
    color: #38bdf8;
    font-weight: 800;
}

.manual-json-clear-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #94a3b8;
    font-size: 13px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.manual-json-clear-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.2);
}

/* Studio Specs Bar (Ratio, Img, Video, Modelo, ⚡) */
.jm-composer-specs-bar {
    display: flex;
    align-items: center;
    gap: 5px;
    width: 100%;
    padding: 5px 7px;
    border-radius: 11px;
    background: rgba(15, 23, 42, 0.58);
    border: 1px solid rgba(148, 163, 184, 0.15);
    box-sizing: border-box;
    flex-wrap: nowrap;
    overflow: hidden;
}

.composer-spec-pill {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(9, 13, 26, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    padding: 3px 6px;
    min-width: 0;
    transition: all 0.18s ease;
    position: relative;
}

.composer-spec-pill:hover {
    border-color: rgba(129, 140, 248, 0.55);
    background: rgba(19, 27, 52, 0.88);
}

.composer-spec-pill.ratio-spec-pill {
    flex: 1 1 22%;
    border-color: rgba(56, 189, 248, 0.32);
    background: linear-gradient(135deg, rgba(8, 47, 73, 0.52) 0%, rgba(15, 23, 42, 0.82) 100%);
}

.composer-spec-pill.img-spec-pill {
    flex: 1 1 24%;
    border-color: rgba(16, 185, 129, 0.32);
    background: linear-gradient(135deg, rgba(6, 78, 59, 0.45) 0%, rgba(15, 23, 42, 0.82) 100%);
}

.composer-spec-pill.vid-spec-pill {
    flex: 1 1 26%;
    border-color: rgba(168, 85, 247, 0.36);
    background: linear-gradient(135deg, rgba(59, 7, 100, 0.48) 0%, rgba(15, 23, 42, 0.82) 100%);
}

.composer-spec-pill.flow-model-spec-pill {
    flex: 1 1 28%;
    border-color: rgba(251, 191, 36, 0.32);
    background: linear-gradient(135deg, rgba(120, 53, 15, 0.38) 0%, rgba(15, 23, 42, 0.82) 100%);
}

.composer-spec-icon {
    font-size: 11px;
    line-height: 1;
    flex-shrink: 0;
}

.composer-spec-label {
    font-size: 9px;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.25px;
    flex-shrink: 0;
}

.composer-spec-caret {
    color: #94a3b8;
    flex-shrink: 0;
    pointer-events: none;
}

.composer-spec-select {
    appearance: none;
    -webkit-appearance: none;
    background: transparent !important;
    background-image: none !important;
    border: none !important;
    color: #f8fafc !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    font-family: inherit;
    padding: 1px 2px !important;
    margin: 0 !important;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    cursor: pointer;
    outline: none !important;
    box-shadow: none !important;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.composer-spec-select option {
    background: #0f172a !important;
    color: #f8fafc !important;
    font-size: 11.5px;
    font-weight: 600;
}

.composer-spec-gear-btn {
    flex: 0 0 26px;
    width: 26px !important;
    height: 26px !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 7px !important;
    border: 1px solid rgba(129, 140, 248, 0.4) !important;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.28) 0%, rgba(168, 85, 247, 0.28) 100%) !important;
    color: #e0e7ff !important;
    font-size: 12px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.18s ease;
}

.composer-spec-gear-btn:hover {
    transform: translateY(-1px) scale(1.06);
    border-color: rgba(236, 72, 153, 0.7) !important;
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.45) !important;
}

/* Bottom Toolbar, Micro-Pills & Circular Tool Buttons */
.jm-composer-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.gemini-tools-left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.extc-tool-btns-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.gemini-tools-right {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-left: auto;
}

.composer-agent-pills {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.composer-micro-pill {
    position: relative;
    cursor: pointer;
    user-select: none;
    display: inline-flex;
    align-items: center;
    margin: 0;
}

.composer-micro-pill input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.micro-pill-box {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 9.5px;
    font-weight: 700;
    color: #94a3b8;
    transition: all 0.2s ease;
    height: 22px;
    box-sizing: border-box;
    white-space: nowrap;
}

.micro-pill-box:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.2);
}

.pill-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #64748b;
    transition: all 0.2s ease;
}

.composer-micro-pill input:checked + .micro-pill-box {
    background: rgba(56, 189, 248, 0.18);
    border-color: rgba(56, 189, 248, 0.55);
    color: #38bdf8;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
}

.composer-micro-pill input:checked + .micro-pill-box .pill-dot {
    background: #38bdf8;
    box-shadow: 0 0 6px #38bdf8;
}

.composer-micro-pill.parent-pill input:checked + .micro-pill-box {
    background: rgba(168, 85, 247, 0.2);
    border-color: rgba(168, 85, 247, 0.6);
    color: #c084fc;
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.3);
}

.composer-micro-pill.parent-pill input:checked + .micro-pill-box .pill-dot {
    background: #c084fc;
    box-shadow: 0 0 6px #c084fc;
}

.composer-micro-pill.serie-pill input:checked + .micro-pill-box {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.22) 0%, rgba(168, 85, 247, 0.22) 100%);
    border-color: rgba(236, 72, 153, 0.65);
    color: #f472b6;
    box-shadow: 0 0 12px rgba(236, 72, 153, 0.35);
}

.composer-micro-pill.serie-pill input:checked + .micro-pill-box .pill-dot {
    background: #f472b6;
    box-shadow: 0 0 8px #f472b6;
}

.jm-tool-divider {
    width: 1px;
    height: 16px;
    background: rgba(255, 255, 255, 0.12);
    margin: 0 2px;
}

.gemini-tool-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    flex-shrink: 0;
}

.gemini-tool-btn:hover {
    background: rgba(139, 92, 246, 0.16);
    border-color: rgba(139, 92, 246, 0.45);
    color: #c4b5fd;
    transform: scale(1.08);
}

.gemini-tool-btn.active {
    background: rgba(30, 41, 59, 0.78) !important;
    border-color: rgba(99, 102, 241, 0.85) !important;
    color: #a5b4fc !important;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.45);
}

.gemini-tool-btn.upload-ref-btn.active {
    border-color: rgba(59, 130, 246, 0.9) !important;
    color: #3b82f6 !important;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5) !important;
}

.gemini-tool-btn.video-autoconfig-btn.active {
    background: rgba(16, 185, 129, 0.16) !important;
    border-color: rgba(16, 185, 129, 0.9) !important;
    color: #34d399 !important;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.55) !important;
}

.gemini-tool-btn.random-dice-btn.active {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.22) 0%, rgba(217, 70, 239, 0.2) 100%) !important;
    border-color: #f59e0b !important;
    color: #fbbf24 !important;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.45) !important;
}

.gemini-tool-btn.random-dice-btn.rolling svg {
    animation: extcRollDice 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes extcRollDice {
    0% { transform: rotate(0deg) scale(1); }
    30% { transform: rotate(180deg) scale(1.25); }
    70% { transform: rotate(360deg) scale(0.9); }
    100% { transform: rotate(360deg) scale(1); }
}

.extc-mic-tool-btn.recording {
    background: rgba(239, 68, 68, 0.25) !important;
    border-color: #ef4444 !important;
    color: #fecaca !important;
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.65) !important;
    animation: extMicPulse 1.2s infinite ease-in-out;
}

/* Right Badges (Nicho, Duración, Modelo IA & Send Button ↑) */
.gemini-niche-badge,
.gemini-duration-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(56, 189, 248, 0.28);
    border-radius: 99px;
    padding: 3px 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    height: 25px;
    box-sizing: border-box;
    font-size: 11px;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.gemini-duration-badge {
    border-color: rgba(167, 139, 250, 0.3);
}

.gemini-niche-badge:hover,
.gemini-duration-badge:hover {
    background: rgba(56, 189, 248, 0.14);
    border-color: rgba(56, 189, 248, 0.6);
    transform: translateY(-1px);
}

.gemini-niche-badge.has-niche {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.18) 0%, rgba(168, 85, 247, 0.18) 100%);
    border-color: rgba(56, 189, 248, 0.65);
}

.gemini-model-badge-wrap {
    position: relative;
    display: inline-flex;
}

.gemini-model-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    padding: 4px 11px;
    border-radius: 20px;
    height: 25px;
    box-sizing: border-box;
    font-size: 11px;
    font-weight: 700;
    color: #e3e3e3;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    white-space: nowrap;
}

.gemini-model-badge:hover,
.gemini-model-badge.active {
    background: rgba(255, 255, 255, 0.16);
    border-color: #a855f7;
    color: #ffffff;
}

.gemini-model-floating-menu {
    position: absolute;
    bottom: calc(100% + 10px);
    right: 0;
    min-width: 265px;
    max-width: 310px;
    background: #1e1f20;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    padding: 8px 6px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85);
    z-index: 10000;
}

.gemini-model-floating-items {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gemini-floating-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.gemini-floating-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.gemini-floating-item.active {
    background: rgba(168, 85, 247, 0.15);
}

.gemini-floating-check {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    color: #c084fc;
    flex-shrink: 0;
}

.gemini-floating-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.gemini-floating-title {
    font-size: 12.5px;
    font-weight: 700;
    color: #f1f3f4;
}

.gemini-floating-desc {
    font-size: 10.5px;
    color: #9aa0a6;
    margin-top: 2px;
}

.gemini-floating-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 5px 8px;
}

.gemini-send-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border: none;
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    padding: 0;
    flex-shrink: 0;
}

.gemini-send-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #60a5fa 0%, #2563eb 100%);
    box-shadow: 0 0 16px rgba(59, 130, 246, 0.65);
    transform: scale(1.08);
}

.gemini-send-btn:disabled {
    opacity: 0.65;
    cursor: wait;
}

.extc-stop-send-btn {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%) !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.45) !important;
}

/* =========================================================================
   JAYMAKER GALLERY MODALS & MATRIZ 4x1 CONTINUIDAD
   ========================================================================= */
.gallery-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 99998;
}

.gallery-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 94%;
    max-width: 490px;
    max-height: 88vh;
    background: rgba(27, 27, 35, 0.96);
    backdrop-filter: blur(50px);
    -webkit-backdrop-filter: blur(50px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 0;
    display: flex;
    flex-direction: column;
    z-index: 99999;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    box-sizing: border-box;
    overflow: hidden;
}

.gallery-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 14px 16px 8px 16px;
    gap: 10px;
}

.gallery-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.gallery-header-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, #a855f7 0%, #6366f1 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
    flex-shrink: 0;
}

.gallery-header-title {
    font-size: 14.5px;
    font-weight: 700;
    color: #f8fafc;
    line-height: 1.2;
    margin: 0;
}

.gallery-header-sub {
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.3;
    margin: 2px 0 0 0;
}

.gallery-close-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.gallery-close-btn:hover {
    background: rgba(239, 68, 68, 0.22);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.45);
}

.gallery-search-wrap {
    position: relative;
    padding: 0 16px 10px 16px;
}

.gallery-search-icon {
    position: absolute;
    left: 26px;
    top: 18px;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    color: #94a3b8;
    pointer-events: none;
}

.gallery-search-wrap input {
    width: 100%;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 0 12px 0 32px;
    color: #ffffff;
    font-size: 12px;
    outline: none;
    box-sizing: border-box;
}

.gallery-search-wrap input:focus {
    border-color: rgba(168, 85, 247, 0.65);
    background: rgba(0, 0, 0, 0.35);
}

.gallery-grid-wrap {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0 16px 12px 16px;
    max-height: 330px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.gallery-card {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background-color: rgb(27, 27, 35);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.gallery-card:hover {
    border-color: rgba(255, 255, 255, 0.28);
    transform: translateY(-1.5px);
}

.gallery-card.active {
    box-shadow: 0 0 0 2px #a855f7, 0 0 20px rgba(124, 58, 237, 0.45);
    border-color: transparent;
}

.gallery-card-bg {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.gallery-card-check {
    position: absolute;
    right: 6px;
    top: 6px;
    z-index: 2;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #c4b5fd;
    color: #1b0f3a;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 900;
}

.gallery-card.active .gallery-card-check {
    display: flex;
}

.gallery-card-scrim {
    position: absolute;
    inset-x: 0;
    bottom: 0;
    height: 52%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0) 100%);
    pointer-events: none;
}

.gallery-card-name {
    position: absolute;
    inset-x: 5px;
    bottom: 5px;
    z-index: 1;
    font-size: 10px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
}

.gallery-custom-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.28);
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    gap: 10px;
}

.gallery-custom-inputs {
    display: flex;
    align-items: center;
    gap: 6px;
}

.gallery-custom-group {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 3px 7px;
    gap: 4px;
}

.gallery-custom-group input {
    width: 46px;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    outline: none;
}

.gallery-custom-group span {
    font-size: 9.5px;
    color: #94a3b8;
    font-weight: 600;
}

.gallery-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(20, 20, 26, 0.72);
    gap: 10px;
}

.gallery-selected-label {
    font-size: 11.5px;
    color: #94a3b8;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gallery-selected-label strong {
    color: #ffffff;
    font-weight: 700;
}

.gallery-apply-btn {
    background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
    border: none;
    border-radius: 8px;
    padding: 7px 16px;
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.gallery-apply-btn:hover {
    background: linear-gradient(135deg, #c084fc 0%, #9333ea 100%);
    transform: translateY(-1px);
}

/* Paradigm Detail Box */
.paradigm-modal-detail-box {
    margin-top: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92) 0%, rgba(30, 27, 75, 0.84) 55%, rgba(67, 20, 7, 0.5) 100%);
    border: 1px solid rgba(245, 158, 11, 0.42);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.paradigm-modal-detail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.paradigm-hud-badge {
    font-size: 10.5px;
    font-weight: 800;
    color: #fde68a;
}

.paradigm-hud-tag {
    font-size: 8.5px;
    font-weight: 800;
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.16);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 99px;
    padding: 1px 6px;
}

.paradigm-modal-detail-row {
    font-size: 10.5px;
    line-height: 1.38;
    color: #cbd5e1;
}

.paradigm-hud-key {
    color: #a78bfa;
    font-weight: 700;
    margin-right: 4px;
}

/* Matriz 4x1 Continuity Pills */
.fr-toggle-pro-pill {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 6px;
    padding: 9px 11px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.78);
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.studio-pill-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.fr-toggle-pill-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.fr-toggle-pill-label {
    font-weight: 700;
    font-size: 11.5px;
}

.studio-pill-sub {
    font-size: 9.5px;
    color: #94a3b8;
}

.fr-switch-pro {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 22px;
    pointer-events: none;
    margin: 0;
}

.fr-switch-pro input {
    opacity: 0;
    width: 0;
    height: 0;
}

.fr-switch-pro .fr-slider {
    position: absolute;
    inset: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.16);
    transition: all 0.22s ease;
}

.fr-switch-pro .fr-slider::before {
    position: absolute;
    content: '';
    width: 15px;
    height: 15px;
    left: 2px;
    top: 2px;
    background: #94a3b8;
    border-radius: 50%;
    transition: all 0.22s ease;
}

.fr-switch-pro input:checked + .fr-slider {
    background: #00c853;
    border-color: #00c853;
    box-shadow: 0 0 10px rgba(0, 200, 83, 0.45);
}

.fr-switch-pro input:checked + .fr-slider::before {
    transform: translateX(19px);
    background: #ffffff;
}

.pill-purple { border: 1.5px solid rgba(168, 85, 247, 0.35); }
.pill-purple .fr-toggle-pill-label { color: #c084fc; }
.pill-purple.is-checked { background: rgba(168, 85, 247, 0.16); border-color: #c084fc; }

.pill-cyan { border: 1.5px solid rgba(56, 189, 248, 0.35); }
.pill-cyan .fr-toggle-pill-label { color: #38bdf8; }
.pill-cyan.is-checked { background: rgba(56, 189, 248, 0.15); border-color: #38bdf8; }

.pill-pink { border: 1.5px solid rgba(244, 114, 182, 0.35); }
.pill-pink .fr-toggle-pill-label { color: #f472b6; }
.pill-pink.is-checked { background: rgba(244, 114, 182, 0.15); border-color: #f472b6; }

.pill-violet { border: 1.5px solid rgba(167, 139, 250, 0.35); }
.pill-violet .fr-toggle-pill-label { color: #a78bfa; }
.pill-violet.is-checked { background: rgba(167, 139, 250, 0.16); border-color: #a78bfa; }

/* =========================================================================
   GOOGLE FLOW PROMPT BOX SETTINGS (AUTHENTIC QUICK CONFIG COMPONENT)
   ========================================================================= */
flow-prompt-box-settings,
.flow-prompt-box-settings {
    display: block;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(139, 92, 246, 0.28);
    border-radius: 14px;
    padding: 10px 12px;
}

.settings-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

flow-toggles {
    display: block;
    width: 100%;
}

.mat-button-toggle-group {
    display: flex;
    width: 100%;
    background: rgba(30, 41, 59, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 9999px;
    padding: 2.5px;
    gap: 2px;
    box-sizing: border-box;
}

.mat-button-toggle {
    flex: 1;
    border-radius: 9999px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid transparent;
}

.mat-button-toggle:hover:not(.mat-button-toggle-checked) {
    background: rgba(255, 255, 255, 0.06);
}

.mat-button-toggle-button {
    width: 100%;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    font-weight: 600;
    padding: 5px 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.toggle-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.mat-button-toggle.mat-button-toggle-checked {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.4) 0%, rgba(99, 102, 241, 0.34) 100%);
    border-color: rgba(167, 139, 250, 0.68);
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.35);
}

.mat-button-toggle.mat-button-toggle-checked .mat-button-toggle-button {
    color: #ffffff;
    font-weight: 700;
}

.google-symbols,
mat-icon {
    font-family: 'Material Symbols Outlined', sans-serif !important;
    font-weight: normal;
    font-style: normal;
    font-size: 15px;
    line-height: 1;
    display: inline-block;
    vertical-align: middle;
}

mat-divider,
.mat-divider {
    display: block;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 3px 0;
}

.flow-model-select-wrapper {
    position: relative;
    width: 100%;
}

.flow-button-primary {
    width: 100%;
    background: rgba(30, 41, 59, 0.88);
    border: 1px solid rgba(139, 92, 246, 0.35);
    border-radius: 9999px;
    padding: 6px 14px;
    color: #f1f5f9;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.model-select-trigger-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.flow-model-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(139, 92, 246, 0.45);
    border-radius: 12px;
    padding: 4px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.85);
    z-index: 120;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.flow-model-option {
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.flow-model-option:hover {
    background: rgba(139, 92, 246, 0.22);
}

.flow-model-option.active {
    background: rgba(139, 92, 246, 0.32);
    border: 1px solid rgba(167, 139, 250, 0.38);
}

.flow-model-name {
    font-size: 11px;
    font-weight: 700;
    color: #f8fafc;
}

.flow-model-desc {
    font-size: 9.5px;
    color: #94a3b8;
}

.flow-frames-control-panel,
.flow-ingredients-control-panel {
    background: rgba(6, 182, 212, 0.06);
    border: 1px solid rgba(6, 182, 212, 0.25);
    border-radius: 10px;
    padding: 8px 10px;
    margin-top: 2px;
}

.flow-ingredients-title,
.flow-frames-title {
    font-size: 10.5px;
    font-weight: 800;
    color: #67e8f9;
}

.flow-ingredients-hint {
    font-size: 10px;
    color: #94a3b8;
    margin: 3px 0 0 0;
    line-height: 1.35;
}

.flow-frames-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.flow-frames-badge {
    font-size: 8.5px;
    font-weight: 700;
    color: #22d3ee;
    background: rgba(6, 182, 212, 0.15);
    padding: 1px 6px;
    border-radius: 99px;
}

.flow-frames-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.flow-frame-card {
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 6px;
}

.flow-frame-card-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 9.5px;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 4px;
}

.flow-frame-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}
.flow-frame-dot.green { background: #10b981; }
.flow-frame-dot.red { background: #f43f5e; }

.flow-frame-dropzone {
    border: 1px dashed rgba(148, 163, 184, 0.35);
    border-radius: 7px;
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    font-size: 10.5px;
    color: #94a3b8;
}

.flow-frame-dropzone:hover {
    border-color: #38bdf8;
    color: #e0f2fe;
}

.flow-frame-filled-state {
    width: 100%;
    height: 100%;
    position: relative;
}

.flow-frame-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.flow-frame-remove-btn {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.78);
    color: #fff;
    font-size: 10px;
    cursor: pointer;
}

/* Quick Config Studio Section */
.extc-qc-studio-box {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 14px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.extc-qc-section-title {
    font-size: 11px;
    font-weight: 800;
    color: #c4b5fd;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.extc-qc-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.extc-qc-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.extc-qc-field label {
    font-size: 10.5px;
    font-weight: 700;
    color: #cbd5e1;
    margin: 0;
}

.extc-qc-field .glass-input {
    font-size: 11.5px;
    padding: 6px 9px;
}

.extc-qc-switches-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 2px 0;
}

/* 100% Identical Layout to Chrome Extension Composer (Tiles Left + Prompt Right + Single-Row Specs Bar) */
#extc-composer-container .jm-composer-body {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
}

#extc-composer-container .jm-tiles-bar {
    display: flex;
    flex-direction: row;
    gap: 6px;
    flex-shrink: 0;
    width: auto;
}

#extc-composer-container .jm-tile-btn {
    width: 58px;
    min-width: 58px;
    max-width: 58px;
    height: 58px;
}

#extc-composer-container .jm-input-wrapper {
    flex: 1;
    min-width: 0;
    width: auto;
}

#extc-composer-container #ext-prompt {
    width: 100%;
    min-height: 58px;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.25) transparent;
}

#extc-composer-container #ext-prompt::-webkit-scrollbar {
    width: 5px;
}

#extc-composer-container #ext-prompt::-webkit-scrollbar-track {
    background: transparent;
}

#extc-composer-container #ext-prompt::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.28);
    border-radius: 999px;
}

#extc-composer-container .jm-composer-specs-bar {
    flex-wrap: nowrap;
    gap: 5px;
    overflow: hidden;
    margin: 0 2px 2px 2px;
}

#extc-composer-container .composer-spec-pill {
    flex: 1 1 0;
    min-width: 0;
}

@media (max-width: 540px) {
    #extc-composer-container .jm-composer-body {
        flex-direction: column;
        gap: 8px;
    }
    #extc-composer-container .jm-tiles-bar {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        width: 100%;
    }
    #extc-composer-container .jm-tile-btn {
        width: 100%;
        min-width: 0;
        max-width: none;
    }
    #extc-composer-container .jm-input-wrapper {
        width: 100%;
    }
    #extc-composer-container .jm-composer-specs-bar {
        flex-wrap: wrap;
        gap: 6px;
    }
    #extc-composer-container .composer-spec-pill {
        flex: 1 1 calc(50% - 24px);
        min-width: 130px;
    }
}

/* Responsive Mobile Polish for Cloned Extension Composer */
@media (max-width: 720px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .extc-qc-grid-2 {
        grid-template-columns: 1fr;
    }
}

/* Public Paddle Compliance Footer — Respeta el ancho del sidebar en escritorio */
#facereels-public-footer {
    margin-left: var(--sidebar-width, 240px) !important;
    width: calc(100% - var(--sidebar-width, 240px)) !important;
    box-sizing: border-box !important;
    position: relative;
    z-index: 2;
}

@media (max-width: 768px) {
    #facereels-public-footer {
        margin-left: 0 !important;
        width: 100% !important;
        padding-bottom: 92px !important;
    }
}
