/* ═══════════════════════════════════════════════════════════
   SAAS CLEAN ARCHITECTURE v3.0 LUXURY STYLES
   Minimalist, Ultra-Fast, Islamic Dark Luxury Palette
   =========================================================== */

:root {
    --color-bg-base: #090d16;
    --color-bg-card: rgba(18, 26, 43, 0.88);
    --color-bg-card-hover: rgba(24, 35, 58, 0.96);
    --color-border-gold: rgba(212, 175, 55, 0.25);
    --color-gold: #d4af37;
    --color-gold-bright: #f3e5ab;
    --color-emerald: #10b981;
    --color-emerald-glow: rgba(16, 185, 129, 0.25);
    --font-cairo: 'Cairo', system-ui, -apple-system, sans-serif;
    --font-quran: 'Amiri', 'Amiri Quran', serif;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--color-bg-base) !important;
    color: #f1f5f9;
    font-family: var(--font-cairo);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ── Ambient Effects ── */
.particle-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

.aurora-glow {
    position: fixed;
    top: -20%;
    left: 20%;
    width: 60vw;
    height: 60vh;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, rgba(212, 175, 55, 0.04) 50%, transparent 70%);
    filter: blur(80px);
    z-index: 0;
    pointer-events: none;
}

/* ── App Header & Navigation ── */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(9, 13, 22, 0.9);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.header-container {
    max-width: 1380px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    cursor: pointer;
}

.brand-icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.5));
}

.brand-title {
    font-size: 1.25rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 40%, var(--color-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
    letter-spacing: -0.5px;
}

.brand-tag {
    font-size: 0.68rem;
    color: var(--color-gold);
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.25);
    padding: 1px 6px;
    border-radius: 6px;
    font-weight: 600;
}

.nav-tabs {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(18, 26, 43, 0.7);
    padding: 0.35rem 0.45rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1rem;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-family: var(--font-cairo);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.nav-tab-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

.nav-tab-btn.active {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.22) 0%, rgba(16, 185, 129, 0.22) 100%);
    border: 1px solid rgba(212, 175, 55, 0.45);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.header-user-section {
    display: flex;
    align-items: center;
}

.user-profile-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.35);
    padding: 0.45rem 1rem;
    border-radius: 30px;
    color: #f1f5f9;
    font-family: var(--font-cairo);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-profile-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--color-gold);
}

.user-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-gold), #b8860b);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
}

/* ── Main Layout & Views ── */
.app-main {
    max-width: 1380px;
    margin: 0 auto;
    padding: 2rem 1.5rem 5rem 1.5rem;
    position: relative;
    z-index: 1;
}

.tab-view {
    display: none;
    animation: fadeInTab 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.tab-view.active {
    display: block;
}

@keyframes fadeInTab {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Cards Design ── */
.luxury-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-gold);
    border-radius: 18px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    transition: border-color 0.25s ease;
}

.luxury-card:hover {
    border-color: rgba(212, 175, 55, 0.4);
}

.card-header-styled {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.header-icon {
    font-size: 1.5rem;
    background: rgba(212, 175, 55, 0.1);
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.card-title-styled {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.card-subtitle-styled {
    font-size: 0.8rem;
    color: #94a3b8;
    margin: 3px 0 0 0;
}

/* ── Form Controls ── */
.form-group {
    margin-bottom: 1.2rem;
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 0.4rem;
}

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

.styled-select,
.styled-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(10, 15, 26, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: #f8fafc;
    font-family: var(--font-cairo);
    font-size: 0.9rem;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.styled-select:focus,
.styled-input:focus {
    outline: none;
    border-color: var(--color-gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

.styled-range {
    width: 100%;
    accent-color: var(--color-gold);
    cursor: pointer;
}

.range-value {
    font-size: 0.85rem;
    color: var(--color-gold);
    font-weight: 700;
}

.color-swatches {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.color-swatch {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--c);
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.color-swatch:hover {
    transform: scale(1.15);
}

.color-swatch.active {
    border-color: #ffffff;
    box-shadow: 0 0 10px var(--c);
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.4rem;
    border-radius: 12px;
    font-family: var(--font-cairo);
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.25s ease;
}

.btn-gold {
    background: linear-gradient(135deg, #d4af37 0%, #aa820a 100%);
    color: #0b0f19 !important;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.35);
}

.btn-gold:hover {
    background: linear-gradient(135deg, #f0ca4f 0%, #c4991c 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.45);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.07);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-danger-outline {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger-outline:hover {
    background: #ef4444;
    color: #ffffff;
}

.btn-sm {
    padding: 0.45rem 0.85rem;
    font-size: 0.8rem;
    border-radius: 8px;
}

.btn-mega {
    background: linear-gradient(135deg, #d4af37 0%, #10b981 100%);
    color: #0b0f19;
    font-size: 1.05rem;
    font-weight: 800;
    padding: 1rem 2rem;
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.3);
}

.btn-mega:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(16, 185, 129, 0.4);
}

/* ── Auto Upload Toggle Banner ── */
.auto-upload-banner {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    cursor: pointer;
}

.banner-title {
    display: block;
    font-weight: 700;
    color: #ffffff;
    font-size: 0.9rem;
}

.banner-desc {
    display: block;
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 2px;
}

/* ── Progress Section ── */
.progress-section {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(10, 15, 26, 0.6);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 12px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-gold);
    margin-bottom: 0.6rem;
}

.progress-track {
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #d4af37, #10b981);
    transition: width 0.3s ease;
}

/* ── Studio 2-Column Layout ── */
.studio-layout {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 1024px) {
    .studio-layout {
        grid-template-columns: 1fr;
    }
}

/* ── Phone Mockup (9:16 Vertical Reel) ── */
.studio-preview {
    position: sticky;
    top: 5.5rem;
    display: flex;
    justify-content: center;
}

.phone-mockup-wrapper {
    width: 320px;
    max-width: 100%;
}

.phone-frame {
    width: 100%;
    aspect-ratio: 9 / 18.5;
    background: #0f141f;
    border-radius: 44px;
    border: 4px solid rgba(212, 175, 55, 0.4);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(212, 175, 55, 0.15);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.phone-notch {
    width: 90px;
    height: 22px;
    background: #000000;
    border-radius: 0 0 14px 14px;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.phone-screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.2rem 1.2rem 1.5rem 1.2rem;
    box-sizing: border-box;
    text-align: center;
    position: relative;
    transition: background 0.4s ease;
}

.phone-top-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.badge-live {
    font-size: 0.65rem;
    background: rgba(239, 68, 68, 0.25);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.4);
    padding: 2px 7px;
    border-radius: 20px;
    font-weight: 700;
}

.badge-gold {
    font-size: 0.65rem;
    background: rgba(212, 175, 55, 0.2);
    color: var(--color-gold);
    border: 1px solid rgba(212, 175, 55, 0.4);
    padding: 2px 7px;
    border-radius: 20px;
    font-weight: 700;
}

.phone-calligraphy-center {
    margin: auto 0;
}

.phone-surah-title {
    font-family: var(--font-quran);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-gold);
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.6);
    margin-bottom: 0.75rem;
}

.phone-verse-text {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    margin-bottom: 1rem;
    padding: 0 0.5rem;
}

.phone-reciter-name {
    font-size: 0.85rem;
    color: #e2e8f0;
    opacity: 0.9;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.audio-waveform {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 32px;
    margin: 1rem 0;
}

.wave-bar {
    width: 3px;
    background: var(--color-gold);
    border-radius: 3px;
    animation: waveBounce 1.2s ease-in-out infinite alternate;
}

.wave-bar:nth-child(1) { height: 12px; animation-delay: 0.1s; }
.wave-bar:nth-child(2) { height: 22px; animation-delay: 0.3s; }
.wave-bar:nth-child(3) { height: 30px; animation-delay: 0.2s; }
.wave-bar:nth-child(4) { height: 18px; animation-delay: 0.4s; }
.wave-bar:nth-child(5) { height: 26px; animation-delay: 0.1s; }
.wave-bar:nth-child(6) { height: 15px; animation-delay: 0.3s; }
.wave-bar:nth-child(7) { height: 28px; animation-delay: 0.5s; }
.wave-bar:nth-child(8) { height: 20px; animation-delay: 0.2s; }
.wave-bar:nth-child(9) { height: 10px; animation-delay: 0.4s; }

@keyframes waveBounce {
    0% { transform: scaleY(0.4); opacity: 0.5; }
    100% { transform: scaleY(1); opacity: 1; }
}

.phone-bottom-bar {
    padding-top: 0.5rem;
}

.phone-brand-tag {
    font-size: 0.72rem;
    color: #94a3b8;
    letter-spacing: 1px;
}

/* ── Real Video Mockup Preview ── */
.phone-video-preview-wrapper {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    z-index: 8;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 40px;
    overflow: hidden;
}

.phone-real-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000000;
}

.phone-video-status-bar {
    position: absolute;
    top: 26px;
    left: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(212, 175, 55, 0.5);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 0.75rem;
    color: #ffffff;
    font-weight: 700;
    z-index: 12;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.pulse-indicator {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 8px #22c55e;
    animation: pulseGlow 1.5s infinite;
}

@keyframes pulseGlow {
    0% { transform: scale(0.9); opacity: 0.7; }
    50% { transform: scale(1.25); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.7; }
}

.phone-design-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.phone-mockup-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    animation: fadeIn 0.3s ease;
}

.preview-action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.preview-action-buttons .btn {
    flex: 1 1 auto;
    font-size: 0.82rem;
    padding: 0.55rem 0.85rem;
    font-weight: 600;
}

.phone-batch-pills {
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    padding: 4px 2px;
    scrollbar-width: thin;
}

.phone-batch-pill {
    padding: 5px 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #e2e8f0;
    font-size: 0.75rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.phone-batch-pill:hover,
.phone-batch-pill.active {
    background: var(--color-gold);
    color: #0b0f19;
    border-color: var(--color-gold);
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.4);
}

/* ── Overview Tab ── */
.overview-hero {
    background: linear-gradient(135deg, rgba(18, 26, 43, 0.95) 0%, rgba(9, 13, 22, 0.95) 100%);
    border: 1px solid var(--color-border-gold);
    border-radius: 22px;
    padding: 3rem 2rem;
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

.overview-title {
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 0.75rem 0;
}

.overview-subtitle {
    font-size: 1rem;
    color: #94a3b8;
    max-width: 680px;
    margin: 0 auto 2rem auto;
    line-height: 1.7;
}

.overview-quick-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-gold);
    border-radius: 18px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.stat-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
}

.stat-title {
    font-size: 0.85rem;
    color: #94a3b8;
}

/* ── Scheduler Grid & Components ── */
.scheduler-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2rem;
}

@media (max-width: 900px) {
    .scheduler-grid {
        grid-template-columns: 1fr;
    }
}

.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(10, 15, 26, 0.5);
    padding: 1rem 1.25rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.toggle-label {
    display: block;
    font-weight: 700;
    color: #ffffff;
    font-size: 0.95rem;
}

.toggle-desc {
    display: block;
    font-size: 0.78rem;
    color: #94a3b8;
    margin-top: 3px;
}

/* Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    transition: 0.3s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--color-emerald);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

.next-run-box {
    margin-top: 1.5rem;
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 14px;
    padding: 1.25rem;
    text-align: center;
}

.next-run-label {
    font-size: 0.82rem;
    color: #cbd5e1;
    margin-bottom: 0.4rem;
}

.next-run-timer {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--color-gold);
    font-family: monospace;
    letter-spacing: 1px;
}

.next-run-details {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 4px;
}

/* History */
.history-list {
    max-height: 420px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: rgba(10, 15, 26, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.75rem 1rem;
    border-radius: 12px;
}

.history-item-icon {
    font-size: 1.2rem;
}

.history-item-info {
    flex: 1;
}

.history-item-title {
    font-weight: 700;
    font-size: 0.88rem;
    color: #ffffff;
}

.history-item-meta {
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 2px;
}

.history-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
}

.history-badge.success {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.empty-history {
    text-align: center;
    padding: 3rem 1rem;
    color: #94a3b8;
}

.empty-history span {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

/* ── YouTube Tab ── */
.channel-profile-card {
    max-width: 800px;
    margin: 0 auto;
}

.channel-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.channel-avatar {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--color-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    background: rgba(212, 175, 55, 0.1);
}

.channel-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.channel-details {
    flex: 1;
}

.channel-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 0.4rem 0;
}

.channel-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.82rem;
    color: #94a3b8;
}

.channel-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.stat-badge {
    background: rgba(10, 15, 26, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
}

.stat-badge .stat-label {
    display: block;
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 0.3rem;
}

.stat-badge .stat-val {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
}

.stat-badge .stat-val.success {
    color: var(--color-emerald);
}

/* ── Video Library ── */
.section-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 0.25rem 0;
}

.section-subtitle {
    font-size: 0.85rem;
    color: #94a3b8;
    margin: 0;
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.video-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-gold);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
}

.video-player-wrapper {
    width: 100%;
    aspect-ratio: 9 / 16;
    background: #000000;
}

.reel-video-element {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.video-card-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.video-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 1rem;
}

.video-card-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.empty-state-card {
    text-align: center;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-gold);
    border-radius: 20px;
    padding: 3.5rem 2rem;
    max-width: 600px;
    margin: 2rem auto;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* ── Modal (Auth) ── */
.modal-backdrop {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 999;
    align-items: center;
    justify-content: center;
}

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

.modal-card {
    background: #111827;
    border: 1px solid var(--color-border-gold);
    border-radius: 20px;
    width: 90%;
    max-width: 440px;
    padding: 2rem;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-close-btn {
    position: absolute;
    top: 1rem; left: 1rem;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.2rem;
    cursor: pointer;
}

.modal-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.modal-icon {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.modal-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
}

.modal-subtitle {
    font-size: 0.82rem;
    color: #94a3b8;
    margin-top: 4px;
}

.modal-toggle-text {
    text-align: center;
    font-size: 0.82rem;
    color: #94a3b8;
    margin-top: 1.2rem;
}

.gold-link {
    color: var(--color-gold);
    text-decoration: none;
    font-weight: 700;
}

.gold-link:hover {
    text-decoration: underline;
}

/* ── Floating Toasts ── */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.toast {
    background: rgba(18, 26, 43, 0.95);
    border: 1px solid var(--color-border-gold);
    backdrop-filter: blur(12px);
    color: #ffffff;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    pointer-events: auto;
}

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

.toast-success {
    border-color: rgba(16, 185, 129, 0.4);
}

.toast-error {
    border-color: rgba(239, 68, 68, 0.4);
}

/* ═══════════════════════════════════════════════════════════
   GENERATOR MODE SELECTOR & ISOLATION SYSTEM
   ═══════════════════════════════════════════════════════════ */
.generator-mode-header {
    margin-bottom: 1.5rem;
    grid-column: 1 / -1;
}

.generator-mode-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    background: rgba(12, 18, 30, 0.85);
    padding: 0.6rem;
    border-radius: 18px;
    border: 1px solid var(--color-border-gold);
    backdrop-filter: blur(14px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

@media (max-width: 900px) {
    .generator-mode-nav {
        grid-template-columns: 1fr;
    }
}

.mode-tab-btn {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1.25rem;
    border-radius: 14px;
    border: 1px solid transparent;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    text-align: right;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--font-cairo);
}

.mode-tab-btn:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #f1f5f9;
    transform: translateY(-1px);
}

.mode-tab-btn .mode-icon {
    font-size: 1.6rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
    transition: all 0.25s ease;
}

.mode-tab-btn .mode-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    overflow: hidden;
}

.mode-tab-btn .mode-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: #cbd5e1;
    transition: color 0.25s ease;
}

.mode-tab-btn .mode-desc {
    font-size: 0.74rem;
    color: #64748b;
    line-height: 1.2;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

/* Active Mode Tab State */
.mode-tab-btn.active {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.18) 0%, rgba(16, 185, 129, 0.12) 100%);
    border-color: rgba(212, 175, 55, 0.6);
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.18);
}

.mode-tab-btn.active .mode-icon {
    background: rgba(212, 175, 55, 0.25);
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.4));
}

.mode-tab-btn.active .mode-title {
    color: #ffffff;
    font-weight: 800;
}

.mode-tab-btn.active .mode-desc {
    color: var(--color-gold-bright);
}

/* ── Mode-Specific Panels Visibility ── */
.generator-mode-panel {
    display: none;
    animation: fadeInMode 0.3s ease;
}

.generator-mode-panel.active {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@keyframes fadeInMode {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Safe Preset / Inspiration Pill inside Custom Mode ── */
.safe-suggest-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.btn-inline-suggest {
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--color-gold-bright);
    padding: 0.45rem 0.9rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-family: var(--font-cairo);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-inline-suggest:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--color-gold);
    color: #ffffff;
}

/* ── Quick AI Random Mode Styles ── */
.random-preview-card {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(212, 175, 55, 0.05) 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.random-verse-display {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin: 1rem 0;
}

.verse-meta-pill {
    background: rgba(10, 15, 25, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 0.6rem 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.verse-meta-pill .pill-icon {
    font-size: 1.2rem;
}

.verse-meta-pill .pill-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: #e2e8f0;
}

.btn-dice-reroll {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #f1f5f9;
    padding: 0.75rem;
    border-radius: 12px;
    font-family: var(--font-cairo);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    transition: all 0.2s ease;
}

.btn-dice-reroll:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.5);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
}

/* ── Batch Multi-Video Strategy Selector ── */
.batch-strategy-container {
    margin: 1rem 0;
}

.batch-strategy-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

@media (max-width: 650px) {
    .batch-strategy-grid {
        grid-template-columns: 1fr;
    }
}

.batch-strategy-card {
    background: rgba(14, 20, 33, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    position: relative;
    user-select: none;
}

.batch-strategy-card:hover {
    border-color: rgba(212, 175, 55, 0.4);
    background: rgba(20, 28, 48, 0.85);
}

.batch-strategy-card.selected {
    border-color: var(--color-gold);
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.12) 0%, rgba(16, 185, 129, 0.08) 100%);
    box-shadow: 0 0 16px rgba(212, 175, 55, 0.15);
}

.batch-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.batch-card-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.batch-card-badge {
    font-size: 0.68rem;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    font-weight: 700;
    background: rgba(212, 175, 55, 0.2);
    color: var(--color-gold-bright);
}

.batch-card-desc {
    font-size: 0.78rem;
    color: #94a3b8;
    line-height: 1.35;
}

.batch-sequential-config {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    border: 1px dashed rgba(212, 175, 55, 0.25);
    display: none;
}

.batch-sequential-config.active {
    display: block;
}

.batch-info-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    margin-top: 1rem;
    font-size: 0.82rem;
    color: #cbd5e1;
}

.batch-info-banner .banner-icon {
    font-size: 1.3rem;
    color: var(--color-emerald);
}

/* ═══════════════════════════════════════════════
   AYAH LIMIT INFO & REAL-TIME VALIDATION BADGES
   ═══════════════════════════════════════════════ */
.ayah-limit-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(15, 23, 42, 0.7) 100%);
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 10px;
    padding: 0.6rem 0.95rem;
    margin-top: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    color: #e2e8f0;
    transition: all 0.3s ease;
}

.ayah-limit-info.limit-warning {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: rgba(239, 68, 68, 0.6) !important;
    color: #fca5a5 !important;
}

.ayah-info-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1.4;
}

.ayah-info-icon {
    font-size: 1.05rem;
    flex-shrink: 0;
}

.ayah-count-badge {
    background: rgba(212, 175, 55, 0.22);
    color: var(--color-gold-bright, #f3e5ab);
    border: 1px solid rgba(212, 175, 55, 0.5);
    padding: 0.25rem 0.7rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.78rem;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.styled-input.input-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.25) !important;
}

@keyframes highlightNewVideo {
    0% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.8);
        transform: translateY(-3px) scale(1.02);
    }
    70% {
        box-shadow: 0 0 30px 10px rgba(212, 175, 55, 0.4);
        transform: translateY(0) scale(1);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0);
        transform: scale(1);
    }
}

.video-card.just-created {
    animation: highlightNewVideo 2.8s ease-out;
    border-color: var(--color-gold-bright, #f3e5ab) !important;
}

/* ═══════════════════════════════════════════════════════════
   ULTRA-RESPONSIVE MOBILE ENGINE (Smartphones & Small Tablets)
   Clean Native App Feel, Fixed Bottom Nav, Touch Optimized
   ================================═══════════════════════════ */

/* ── Global Mobile Resets & Touch Smoothness ── */
html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

button, input, select, textarea {
    -webkit-tap-highlight-color: transparent;
}

/* ── Live Preview Header & Mobile Floating Action Button (FAB) ── */
.preview-stage-header {
    display: none;
}

.mobile-preview-fab {
    display: none;
}

/* ── Tablet Smooth Navigation (769px to 1024px) ── */
@media (min-width: 769px) and (max-width: 1024px) {
    .header-container {
        padding: 0.6rem 1rem;
        gap: 0.85rem;
    }

    .nav-tabs {
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        gap: 0.25rem;
    }

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

    .nav-tab-btn {
        padding: 0.45rem 0.75rem;
        font-size: 0.82rem;
        white-space: nowrap;
    }

    .app-main {
        padding: 1.5rem 1rem 3rem 1rem;
    }
}

/* ── Mobile Layouts & Native Experience (<= 768px) ── */
@media (max-width: 768px) {
    /* ── Slim Sticky Top Header ── */
    .app-header {
        position: sticky;
        top: 0;
        z-index: 100;
        padding: 0.5rem 0.85rem;
        background: rgba(9, 13, 22, 0.95);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    }

    .header-container {
        padding: 0;
        gap: 0.75rem;
        justify-content: space-between;
    }

    .brand-logo {
        gap: 0.5rem;
    }

    .brand-icon {
        font-size: 1.45rem;
    }

    .brand-title {
        font-size: 1.05rem;
        letter-spacing: -0.3px;
    }

    .brand-tag {
        display: none;
    }

    .user-profile-btn {
        padding: 0.35rem 0.65rem;
        font-size: 0.76rem;
        gap: 0.35rem;
    }

    .user-name {
        max-width: 75px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* ── Native Fixed Bottom Navigation Dock ── */
    .nav-tabs {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: rgba(9, 13, 22, 0.96);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid rgba(212, 175, 55, 0.28);
        border-bottom: none;
        border-left: none;
        border-right: none;
        border-radius: 0;
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px)) 4px;
        display: flex;
        justify-content: space-around;
        align-items: center;
        gap: 2px;
        box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.65);
    }

    .nav-tab-btn {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        padding: 6px 2px;
        font-size: 0.68rem;
        font-weight: 700;
        color: #94a3b8;
        border-radius: 10px;
        white-space: nowrap;
        min-width: 0;
        background: transparent;
        border: 1px solid transparent;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav-tab-btn .tab-icon {
        font-size: 1.25rem;
        line-height: 1;
    }

    .nav-tab-btn.active {
        color: #ffffff;
        background: linear-gradient(135deg, rgba(212, 175, 55, 0.22) 0%, rgba(16, 185, 129, 0.16) 100%);
        border-color: rgba(212, 175, 55, 0.45);
        box-shadow: 0 0 14px rgba(212, 175, 55, 0.2);
    }

    .nav-tab-btn:active {
        transform: scale(0.92);
    }

    /* ── Main Container Bottom Padding for Bottom Nav ── */
    .app-main {
        padding: 1rem 0.85rem calc(5.4rem + env(safe-area-inset-bottom, 0px)) 0.85rem;
    }

    /* ── Studio Mode Selector (3-Column Segmented Bar) ── */
    .generator-mode-header {
        margin-bottom: 1rem;
    }

    .generator-mode-nav {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 5px;
        padding: 5px;
        border-radius: 14px;
        background: rgba(12, 18, 30, 0.92);
    }

    .mode-tab-btn {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 8px 3px;
        text-align: center;
        gap: 4px;
        border-radius: 10px;
    }

    .mode-tab-btn .mode-icon {
        width: 32px;
        height: 32px;
        font-size: 1.1rem;
        border-radius: 8px;
        margin: 0 auto;
    }

    .mode-tab-btn .mode-info {
        align-items: center;
        gap: 0;
    }

    .mode-tab-btn .mode-title {
        font-size: 0.74rem;
        font-weight: 700;
        white-space: nowrap;
    }

    .mode-tab-btn .mode-desc {
        display: none !important;
    }

    /* ── Touch Friendly Form Inputs & iOS Zoom Stopper ── */
    .styled-select,
    .styled-input {
        font-size: 16px !important; /* Prevents iOS auto-zoom on input focus */
        padding: 0.7rem 0.85rem;
        min-height: 48px;
        border-radius: 12px;
    }

    .form-group {
        margin-bottom: 1rem;
    }

    .form-label {
        font-size: 0.82rem;
        margin-bottom: 0.35rem;
    }

    .form-row-2 {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .form-row-2.compact-row {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.65rem;
    }

    .luxury-card {
        padding: 1.15rem 0.95rem;
        border-radius: 16px;
        margin-bottom: 1.15rem;
    }

    .card-header-styled {
        gap: 0.7rem;
        margin-bottom: 0.9rem;
        padding-bottom: 0.7rem;
    }

    .header-icon {
        width: 38px;
        height: 38px;
        font-size: 1.25rem;
        border-radius: 10px;
    }

    .card-title-styled {
        font-size: 0.98rem;
    }

    .card-subtitle-styled {
        font-size: 0.74rem;
    }

    .color-swatches {
        gap: 10px;
        margin-top: 8px;
    }

    .color-swatch {
        width: 36px;
        height: 36px;
    }

    .btn {
        min-height: 48px;
        font-size: 0.95rem;
        border-radius: 12px;
    }

    .btn:active {
        transform: scale(0.97);
    }

    .btn-gold {
        font-weight: 800;
    }

    .auto-upload-banner {
        padding: 0.85rem 1rem;
    }

    .auto-upload-banner .banner-title {
        font-size: 0.85rem;
    }

    .auto-upload-banner .banner-desc {
        font-size: 0.72rem;
    }

    /* Ayah Limits in Mobile */
    .ayah-limit-info {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
    }

    .ayah-info-left {
        font-size: 0.78rem;
        line-height: 1.35;
    }

    .ayah-count-badge {
        font-size: 0.72rem;
        padding: 2px 8px;
    }

    .safe-suggest-action {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        text-align: center;
    }

    .btn-inline-suggest {
        justify-content: center;
        width: 100%;
        min-height: 40px;
    }

    /* Random Mode Pills on Mobile */
    .random-verse-display {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .verse-meta-pill {
        padding: 0.55rem 0.75rem;
        gap: 0.5rem;
    }

    .verse-meta-pill .pill-text {
        font-size: 0.82rem;
    }

    /* Batch Strategy on Mobile */
    .batch-strategy-grid {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }

    .batch-strategy-card {
        padding: 0.85rem;
    }

    /* ── Overview Tab on Mobile ── */
    .overview-hero {
        padding: 1.75rem 1rem !important;
        border-radius: 18px !important;
        margin-bottom: 1.25rem !important;
    }

    .overview-title {
        font-size: 1.35rem !important;
    }

    .overview-subtitle {
        font-size: 0.86rem !important;
        margin-bottom: 1.25rem !important;
        line-height: 1.6;
    }

    .overview-quick-actions {
        flex-direction: column !important;
        width: 100% !important;
        gap: 0.75rem !important;
    }

    .overview-quick-actions .btn {
        width: 100% !important;
    }

    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 0.85rem !important;
    }

    .stat-card {
        padding: 1rem 1.15rem !important;
        border-radius: 14px !important;
    }

    .stat-icon {
        width: 48px !important;
        height: 48px !important;
        font-size: 1.5rem !important;
        border-radius: 12px !important;
    }

    .stat-value {
        font-size: 1.3rem !important;
    }

    .stat-title {
        font-size: 0.78rem !important;
    }

    /* ── Scheduler Tab on Mobile ── */
    .scheduler-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem;
    }

    .toggle-row {
        padding: 0.85rem 1rem;
        gap: 0.75rem;
    }

    .toggle-label {
        font-size: 0.88rem;
    }

    .toggle-desc {
        font-size: 0.74rem;
    }

    .next-run-box {
        padding: 1rem;
        margin-top: 1.2rem;
    }

    .next-run-timer {
        font-size: clamp(1.2rem, 5vw, 1.7rem);
    }

    .history-item {
        flex-wrap: wrap;
        gap: 0.6rem;
        padding: 0.75rem 0.85rem;
    }

    .history-item-info {
        min-width: 180px;
    }

    /* ── YouTube Tab on Mobile ── */
    .channel-profile-card {
        padding: 1.2rem 1rem;
    }

    .channel-header {
        flex-direction: column !important;
        text-align: center !important;
        gap: 0.9rem !important;
    }

    .channel-meta {
        justify-content: center !important;
        flex-wrap: wrap !important;
        gap: 0.5rem;
    }

    .channel-stats-row {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.45rem !important;
        margin-top: 1rem;
    }

    .stat-badge {
        padding: 0.65rem 0.35rem !important;
    }

    .stat-badge .stat-label {
        font-size: 0.68rem !important;
    }

    .stat-badge .stat-val {
        font-size: 0.85rem !important;
    }

    /* ── Video Library on Mobile ── */
    .section-header-row {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.85rem !important;
        text-align: center;
    }

    .section-header-row .btn {
        width: 100%;
    }

    .videos-grid {
        grid-template-columns: 1fr !important;
        max-width: 350px;
        margin: 0 auto;
        gap: 1.25rem;
    }

    .video-card-actions {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 6px !important;
    }

    .video-card-actions .btn {
        width: 100% !important;
        justify-content: center;
        font-size: 0.8rem !important;
        padding: 0.55rem 0.5rem !important;
    }

    /* ── Slide-Up Bottom Sheet Modal for Mobile ── */
    .modal-backdrop {
        align-items: flex-end;
        padding: 0;
    }

    .modal-card {
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 24px 24px 0 0 !important;
        border-bottom: none !important;
        padding: 1.75rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom, 0px)) 1.25rem !important;
        max-height: 88vh;
        overflow-y: auto;
        margin: 0;
        animation: slideUpModal 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
    }

    @keyframes slideUpModal {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }

    .modal-close-btn {
        top: 1.1rem;
        left: 1.1rem;
        width: 36px;
        height: 36px;
        background: rgba(255, 255, 255, 0.08);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.1rem;
    }

    /* ── Dynamic Island / Push Style Toast on Mobile ── */
    .toast-container {
        top: max(1rem, env(safe-area-inset-top, 1rem)) !important;
        bottom: auto !important;
        left: 1rem !important;
        right: 1rem !important;
        margin: 0 auto !important;
        max-width: 400px !important;
        align-items: center;
    }

    .toast {
        width: 100% !important;
        justify-content: center !important;
        font-size: 0.84rem !important;
        padding: 0.75rem 1.1rem !important;
        border-radius: 14px !important;
        box-shadow: 0 10px 35px rgba(0, 0, 0, 0.75) !important;
    }
}

/* ── Live Phone Mockup Preview on Screens <= 1024px ── */
@media (max-width: 1024px) {
    .preview-stage-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 0.85rem;
        padding: 0.4rem 0.75rem;
        background: rgba(212, 175, 55, 0.08);
        border: 1px dashed rgba(212, 175, 55, 0.3);
        border-radius: 12px;
    }

    .preview-stage-badge {
        font-size: 0.82rem;
        font-weight: 700;
        color: var(--color-gold-bright);
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .preview-stage-hint {
        font-size: 0.72rem;
        color: #94a3b8;
    }

    .studio-preview {
        position: relative;
        top: 0;
        margin-top: 1.5rem;
        padding-bottom: 1rem;
    }

    .phone-mockup-wrapper {
        width: min(290px, 86vw);
        margin: 0 auto;
    }

    .phone-frame {
        border-radius: 36px;
        border-width: 3px;
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7), 0 0 25px rgba(212, 175, 55, 0.12);
    }

    .phone-surah-title {
        font-size: clamp(1.3rem, 5vw, 1.7rem);
    }

    .phone-verse-text {
        font-size: clamp(0.95rem, 3.8vw, 1.15rem);
        line-height: 1.7;
        max-height: 220px;
        overflow-y: auto;
    }

    /* Floating Action Button (FAB) on Mobile */
    .mobile-preview-fab {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        position: fixed;
        bottom: calc(4.6rem + env(safe-area-inset-bottom, 0px));
        left: 50%;
        transform: translateX(-50%);
        z-index: 990;
        background: linear-gradient(135deg, rgba(212, 175, 55, 0.96) 0%, rgba(16, 185, 129, 0.94) 100%);
        color: #090d16;
        font-family: var(--font-cairo);
        font-weight: 800;
        font-size: 0.82rem;
        padding: 0.55rem 1.15rem;
        border-radius: 30px;
        border: 1px solid rgba(255, 255, 255, 0.5);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 14px rgba(212, 175, 55, 0.35);
        cursor: pointer;
        transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
        white-space: nowrap;
    }

    .mobile-preview-fab:active {
        transform: translateX(-50%) scale(0.94);
    }
}


