/* ==========================================================================
   Tool 44: YouTube Metadata Localizer (Title & Description Multi-Language)
   Responsive, Luxury Glassmorphism Console Layout
   Strictly Adhering to GuinRank Design System & Zero-Scroll Trap Standards
   ========================================================================== */

#metadata-localizer-app {
    width: 100%;
    min-height: 100vh;
    padding: 24px 20px 80px;
    background: var(--bg-body, #0a0a0f);
    color: var(--text-main, #e2e8f0);
    position: relative;
    box-sizing: border-box;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tool-main-container {
    max-width: 1280px;
    margin: 0 auto;
    transition: max-width 0.3s ease;
}

#metadata-localizer-app.is-wide-mode .tool-main-container {
    max-width: 100% !important;
}

/* Floating Actions */
.fixed-floating-actions {
    position: fixed;
    top: 85px;
    right: 24px;
    z-index: 999;
}

html[dir="rtl"] .fixed-floating-actions {
    right: auto;
    left: 24px;
}

.floating-expand-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--card-bg, #131722);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    color: var(--text-muted, #94a3b8);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    transition: all 0.2s ease;
}

.floating-expand-btn:hover {
    color: var(--primary-color, #f97316);
    border-color: var(--primary-color, #f97316);
    transform: scale(1.05);
}

/* --- 1. Compliance Micro-Bar --- */
.compliance-micro-bar {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.compliance-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 6px 14px;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.compliance-pill:hover {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.35);
    transform: translateY(-1px);
}

.compliance-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
}

.compliance-shield-icon {
    width: 14px;
    height: 14px;
    color: #10b981;
}

.compliance-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-main, #e2e8f0);
    letter-spacing: 0.2px;
}

.compliance-info-icon {
    width: 13px;
    height: 13px;
    color: var(--text-muted, #94a3b8);
}

/* --- 2. Luxury Console Hero Header --- */
.console-hero-header {
    text-align: center;
    margin-bottom: 36px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-light, rgba(249, 115, 22, 0.1));
    border: 1px solid var(--primary-color, #f97316);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--primary-color, #f97316);
    margin-bottom: 18px;
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary-color, #f97316);
}

.hero-badge-icon {
    width: 14px;
    height: 14px;
}

.hero-title {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.8px;
    line-height: 1.25;
    margin: 0 0 16px;
    color: var(--text-main, #f8fafc);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color, #f97316) 0%, #ec4899 50%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-style: normal;
}

.hero-description {
    max-width: 820px;
    margin: 0 auto 24px;
    font-size: 15px;
    line-height: 1.65;
    color: var(--text-muted, #94a3b8);
}

.hero-features-belt {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 20px;
}

.belt-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--card-bg, #131722);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-main, #cbd5e1);
}

.belt-icon {
    width: 15px;
    height: 15px;
    color: var(--primary-color, #f97316);
}

/* Glass Panels */
.glass-panel {
    background: var(--card-bg, #131722);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    border-radius: 18px;
    backdrop-filter: blur(12px);
    transition: all 0.25s ease;
}

/* --- 3. Unified Command Hub --- */
.unified-command-hub {
    position: relative;
    z-index: 100;
    margin-bottom: 36px;
}

.command-bar-wrapper {
    position: relative;
    z-index: 100;
    display: flex;
    align-items: center;
    padding: 8px 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.command-bar-wrapper.is-focused {
    border-color: var(--primary-color, #f97316);
    box-shadow: 0 0 0 3px var(--primary-light, rgba(249, 115, 22, 0.15));
}

.channel-switcher-wrapper {
    position: relative;
    z-index: 110;
    flex-shrink: 0;
}

.channel-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 12px;
    color: var(--text-main, #e2e8f0);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.channel-dropdown-trigger:hover {
    background: rgba(255, 255, 255, 0.05);
}

.channel-avatar-micro {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.channel-trigger-name {
    max-width: 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-chevron-icon {
    width: 14px;
    height: 14px;
    color: var(--text-muted, #94a3b8);
}

.channel-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 280px;
    background: var(--card-bg, #131722);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.12));
    border-radius: 14px;
    padding: 8px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    z-index: 99999;
    max-height: 280px;
    overflow-y: auto;
}

html[dir="rtl"] .channel-dropdown-menu {
    left: auto;
    right: 0;
}

.dropdown-header-strip {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted, #94a3b8);
    padding: 6px 10px 4px;
}

.dropdown-empty-state {
    padding: 12px 10px;
    font-size: 12.5px;
    color: var(--text-muted, #94a3b8);
    text-align: center;
}

.dropdown-channel-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.dropdown-channel-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.dropdown-channel-row.is-active {
    background: var(--primary-light, rgba(249, 115, 22, 0.12));
    border: 1px solid var(--primary-color, #f97316);
}

.menu-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.menu-ch-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.menu-ch-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main, #f8fafc);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.menu-ch-handle {
    font-size: 11px;
    color: var(--text-muted, #94a3b8);
}

.active-check-icon {
    width: 16px;
    height: 16px;
    color: var(--primary-color, #f97316);
}

.search-divider {
    width: 1px;
    height: 26px;
    background: var(--border-color, rgba(255, 255, 255, 0.08));
    margin: 0 10px;
    flex-shrink: 0;
}

.search-input-col {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.search-lead-icon {
    display: flex;
    align-items: center;
    color: var(--text-muted, #94a3b8);
    padding-left: 6px;
}

html[dir="rtl"] .search-lead-icon {
    padding-left: 0;
    padding-right: 6px;
}

.search-lead-icon i {
    width: 18px;
    height: 18px;
}

.unified-search-input {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-main, #f8fafc);
    font-size: 14.5px;
    outline: none;
}

.unified-search-input::placeholder {
    color: var(--text-muted, #64748b);
}

.clear-input-btn {
    background: none;
    border: none;
    color: var(--text-muted, #94a3b8);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
}

.clear-input-btn:hover {
    color: var(--text-main, #ffffff);
}

.btn-search-action {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-color, #f97316);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 10px 22px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-search-action:hover:not(:disabled) {
    background: var(--primary-hover, #ea580c);
    transform: translateY(-1px);
}

.btn-search-action:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.spinner-inline {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Quick Presets Strip */
.quick-presets-strip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
    padding: 0 4px;
}

.qp-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-muted, #94a3b8);
}

.qp-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--card-bg, #131722);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: var(--text-main, #cbd5e1);
    cursor: pointer;
    transition: all 0.2s ease;
}

.qp-chip:hover {
    border-color: var(--primary-color, #f97316);
    color: var(--primary-color, #f97316);
    transform: translateY(-1px);
}

/* Action Toolbar (Loaded State) */
.cmo-action-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
}

.toolbar-left, .toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toolbar-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--card-bg, #131722);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main, #cbd5e1);
    cursor: pointer;
    transition: all 0.2s ease;
}

.toolbar-btn:hover {
    border-color: var(--primary-color, #f97316);
    color: var(--primary-color, #f97316);
}

.btn-primary-pill {
    background: var(--primary-color, #f97316);
    color: #ffffff;
    border: none;
}

.btn-primary-pill:hover {
    background: var(--primary-hover, #ea580c);
    color: #ffffff;
}

/* --- 4. Loading Stage --- */
.title-loading-stage {
    padding: 60px 20px;
    text-align: center;
}

.loader-pulse-ring {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary-light, rgba(249, 115, 22, 0.15));
    border: 2px solid var(--primary-color, #f97316);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    animation: ring-pulse 1.8s ease-in-out infinite;
}

@keyframes ring-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 var(--primary-light, rgba(249, 115, 22, 0.4)); }
    50% { transform: scale(1.08); box-shadow: 0 0 0 16px rgba(249, 115, 22, 0); }
}

.pulse-icon {
    width: 28px;
    height: 28px;
    color: var(--primary-color, #f97316);
}

.title-loading-stage h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--text-main, #f8fafc);
}

.title-loading-stage p {
    font-size: 13.5px;
    color: var(--text-muted, #94a3b8);
    max-width: 540px;
    margin: 0 auto;
}

/* --- 5. Bento Features Cluster --- */
.console-features {
    position: relative;
    z-index: 1;
    margin-bottom: 40px;
}

.bento-features-cluster {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.bento-card {
    background: var(--card-bg, #131722);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    border-radius: 18px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bento-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.bc-wide-top { grid-column: span 2; }
.bc-tall { grid-row: span 2; }
.bc-wide-mid { grid-column: span 2; }

.bento-decor-icon {
    position: absolute;
    top: 14px;
    right: 18px;
    color: var(--primary-color, #f97316);
    opacity: 0.12;
}

html[dir="rtl"] .bento-decor-icon {
    right: auto;
    left: 18px;
}

.bento-decor-icon i {
    width: 48px;
    height: 48px;
}

.dashed-ring-wrapper {
    display: inline-block;
    padding: 4px;
    border: 1px dashed var(--primary-color, #f97316);
    border-radius: 14px;
    margin-bottom: 14px;
}

.bc-icon-wrapper {
    width: 36px;
    height: 36px;
    background: var(--primary-light, rgba(249, 115, 22, 0.1));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color, #f97316);
}

.bc-icon-wrapper i {
    width: 18px;
    height: 18px;
}

.bc-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--text-main, #f8fafc);
}

.bc-desc {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-muted, #94a3b8);
    margin: 0;
}

/* Animations */
.anim-pulse { animation: bentoPulse 3s ease-in-out infinite; }
.anim-bounce { animation: bentoBounce 2.5s ease-in-out infinite; }
.anim-glow { animation: bentoGlow 3s ease-in-out infinite; }
.anim-float { animation: bentoFloat 3s ease-in-out infinite; }
.anim-spin-slow { animation: bentoSpin 12s linear infinite; }

@keyframes bentoPulse {
    0%, 100% { transform: scale(1); opacity: 0.12; }
    50% { transform: scale(1.1); opacity: 0.22; }
}
@keyframes bentoBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}
@keyframes bentoGlow {
    0%, 100% { filter: drop-shadow(0 0 2px var(--primary-color, #f97316)); }
    50% { filter: drop-shadow(0 0 8px var(--primary-color, #f97316)); }
}
@keyframes bentoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
@keyframes bentoSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* --- 6. Results Workspace --- */
.localizer-workspace-wrapper {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Video Info Banner */
.video-info-banner {
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.vib-left {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.vib-thumbnail {
    width: 88px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    flex-shrink: 0;
}

.vib-meta {
    min-width: 0;
}

.vib-badge-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.vib-pill {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary-color, #f97316);
    background: var(--primary-light, rgba(249, 115, 22, 0.12));
    padding: 3px 8px;
    border-radius: 6px;
}

.vib-lang-count {
    font-size: 11.5px;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.1);
    padding: 3px 8px;
    border-radius: 6px;
}

.vib-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 2px;
    color: var(--text-main, #f8fafc);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vib-channel-name {
    font-size: 12px;
    color: var(--text-muted, #94a3b8);
}

.btn-copy-huge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-color, #f97316);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-copy-huge:hover {
    background: var(--primary-hover, #ea580c);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(249, 115, 22, 0.35);
}

/* Language Selector Tabs Strip */
.languages-tabs-strip {
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.tabs-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted, #94a3b8);
    flex-shrink: 0;
}

.tabs-scroll-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.lang-tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    padding: 8px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    color: var(--text-main, #cbd5e1);
}

.lang-tab-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.lang-tab-btn.is-active {
    background: var(--primary-light, rgba(249, 115, 22, 0.12));
    border-color: var(--primary-color, #f97316);
    color: var(--primary-color, #f97316);
    box-shadow: 0 0 16px rgba(249, 115, 22, 0.2);
}

.tab-flag {
    font-size: 16px;
}

.tab-name {
    font-size: 13px;
    font-weight: 700;
}

.tab-safe-badge {
    font-size: 10px;
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    padding: 1px 5px;
    border-radius: 4px;
    font-weight: 800;
}

.tab-warn-badge {
    font-size: 10px;
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    padding: 1px 5px;
    border-radius: 4px;
    font-weight: 800;
}

/* Side by Side Dual Grid */
.side-by-side-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.metadata-col {
    padding: 24px;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.metadata-col.active-highlight {
    border-color: rgba(249, 115, 22, 0.35);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.col-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    padding-bottom: 14px;
}

.col-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.col-flag {
    font-size: 26px;
}

.col-header h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 2px;
    color: var(--text-main, #f8fafc);
}

.col-sub {
    font-size: 11.5px;
    color: var(--text-muted, #94a3b8);
}

.btn-sm-action {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    color: var(--text-main, #cbd5e1);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-sm-action:hover {
    background: var(--primary-light, rgba(249, 115, 22, 0.1));
    border-color: var(--primary-color, #f97316);
    color: var(--primary-color, #f97316);
}

.field-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field-label-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.field-label-bar label {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-muted, #94a3b8);
}

.char-status-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.char-tag {
    font-size: 11.5px;
    color: var(--text-muted, #94a3b8);
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 6px;
}

.char-tag.warn {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
}

.badge-safe {
    font-size: 11px;
    font-weight: 700;
    color: #10b981;
}

.badge-warn {
    font-size: 11px;
    font-weight: 700;
    color: #ef4444;
}

.readonly-display {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.06));
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--text-muted, #94a3b8);
}

.readonly-display.description-box {
    max-height: 320px;
    overflow-y: auto;
    white-space: pre-wrap;
    font-size: 12.5px;
}

.input-with-copy {
    position: relative;
    display: flex;
    align-items: center;
}

.custom-edit-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    border-radius: 12px;
    padding: 12px 42px 12px 14px;
    font-size: 14px;
    color: var(--text-main, #f8fafc);
    outline: none;
    transition: border-color 0.2s ease;
}

html[dir="rtl"] .custom-edit-input {
    padding: 12px 14px 12px 42px;
}

.custom-edit-input:focus {
    border-color: var(--primary-color, #f97316);
}

.btn-inline-copy {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    color: var(--text-muted, #94a3b8);
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
}

html[dir="rtl"] .btn-inline-copy {
    right: auto;
    left: 8px;
}

.btn-inline-copy:hover {
    color: var(--primary-color, #f97316);
}

.textarea-with-copy {
    position: relative;
    display: flex;
    flex-direction: column;
}

.custom-edit-textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    border-radius: 12px;
    padding: 14px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-main, #f8fafc);
    outline: none;
    resize: vertical;
    font-family: inherit;
    min-height: 280px;
    transition: border-color 0.2s ease;
}

.custom-edit-textarea:focus {
    border-color: var(--primary-color, #f97316);
}

.btn-floating-copy {
    align-self: flex-end;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    color: var(--text-main, #cbd5e1);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-floating-copy:hover {
    background: var(--primary-light, rgba(249, 115, 22, 0.1));
    border-color: var(--primary-color, #f97316);
    color: var(--primary-color, #f97316);
}

/* Studio Guide Panel */
.studio-guide-panel {
    padding: 24px;
    border-radius: 18px;
}

.guide-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.guide-header h3 {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    color: var(--text-main, #f8fafc);
}

.guide-steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.guide-step-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.06));
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-color, #f97316);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.guide-step-card p {
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--text-muted, #cbd5e1);
    margin: 0;
}

/* --- 7. Zero-Scroll Trap Root-Level Modal --- */
html.modal-open, body.modal-open {
    overflow: hidden !important;
    height: 100vh !important;
}

.custom-modal-backdrop {
    position: fixed !important;
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 999999 !important;
    margin: 0 !important;
    padding: 20px !important;
    background: rgba(0, 0, 0, 0.65) !important;
    backdrop-filter: blur(12px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
}

.modal-card {
    background: var(--card-bg, #131722);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.12));
    border-radius: 20px;
    max-width: 580px;
    width: 100%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden !important;
    display: flex;
    flex-direction: column;
    max-height: 85vh;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    flex-shrink: 0;
}

.modal-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    color: var(--text-main, #f8fafc);
}

.modal-close-btn {
    background: none;
    border: none;
    color: var(--text-muted, #94a3b8);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
}

.modal-close-btn:hover {
    color: var(--text-main, #ffffff);
}

.modal-body {
    padding: 20px 24px;
    overflow-y: auto !important;
    max-height: calc(85vh - 135px);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-edu-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--primary-light, rgba(249, 115, 22, 0.1));
    border: 1px solid var(--primary-color, #f97316);
    border-radius: 12px;
    padding: 14px;
    color: var(--primary-color, #f97316);
}

.modal-edu-banner p {
    margin: 4px 0 0;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--text-main, #e2e8f0);
}

.modal-legal-section h4 {
    font-size: 13.5px;
    font-weight: 700;
    margin: 0 0 4px;
    color: var(--text-main, #f8fafc);
}

.modal-legal-section p {
    font-size: 12.5px;
    line-height: 1.55;
    margin: 0;
    color: var(--text-muted, #94a3b8);
}

.modal-footer {
    padding: 14px 24px;
    border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
}

.btn-modal-close {
    padding: 9px 20px;
    background: var(--primary-color, #f97316);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-modal-close:hover {
    background: var(--primary-hover, #ea580c);
}

/* Custom Scrollbar Utility */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(140, 140, 140, 0.25);
    border-radius: 3px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(140, 140, 140, 0.4);
}

/* Responsive */
@media (max-width: 992px) {
    .side-by-side-grid {
        grid-template-columns: 1fr;
    }
    .guide-steps-grid {
        grid-template-columns: 1fr 1fr;
    }
    .bento-features-cluster {
        grid-template-columns: 1fr;
    }
    .bc-wide-top, .bc-tall, .bc-wide-mid {
        grid-column: span 1;
        grid-row: span 1;
    }
    .unified-search-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .search-divider {
        display: none;
    }
}

@media (max-width: 640px) {
    .guide-steps-grid {
        grid-template-columns: 1fr;
    }
}

