/* ================================================================
   DEMO VIDEOS PAGE  —  demo-videos.css
   All rules prefixed with .dv-
   ================================================================ */

/* ── Page Shell ─────────────────────────────────────────────────── */
.dv-page {
    min-height: 100vh;
    background: var(--bg-primary);
}

/* ── Hero ───────────────────────────────────────────────────────── */
.dv-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}

.dv-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(99,102,241,0.12) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
}

.dv-hero::after {
    content: '';
    position: absolute;
    top: -120px;
    right: -80px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(99,102,241,0.18) 0%, transparent 70%);
    pointer-events: none;
}

.dv-hero-inner {
    position: relative;
    z-index: 2;
    text-align: center;
}

.dv-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(99,102,241,0.18);
    border: 1px solid rgba(99,102,241,0.35);
    color: #a5b4fc;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: 100px;
    margin-bottom: 24px;
}

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

.dv-hero h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 700;
    color: #ffffff;
    line-height: 1.15;
    margin: 0 0 16px;
}

.dv-hero h1 span {
    background: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dv-hero-sub {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.6);
    max-width: 520px;
    margin: 0 auto 36px;
    line-height: 1.65;
}

/* Search bar */
.dv-search-wrap {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 14px;
    padding: 4px 4px 4px 18px;
    max-width: 480px;
    margin: 0 auto 40px;
    backdrop-filter: blur(12px);
    transition: border-color 0.2s, background 0.2s;
}

.dv-search-wrap:focus-within {
    border-color: rgba(99,102,241,0.6);
    background: rgba(255,255,255,0.1);
}

.dv-search-wrap svg {
    width: 18px;
    height: 18px;
    color: rgba(255,255,255,0.4);
    flex-shrink: 0;
}

.dv-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 0.95rem;
    padding: 10px 12px;
    font-family: 'Inter', sans-serif;
}

.dv-search-input::placeholder {
    color: rgba(255,255,255,0.35);
}

.dv-search-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: opacity 0.2s, transform 0.15s;
}

.dv-search-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Stats row */
.dv-hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.dv-hero-stat {
    text-align: center;
}

.dv-hero-stat-num {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
}

.dv-hero-stat-label {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.45);
    margin-top: 4px;
}

.dv-hero-stat-sep {
    width: 1px;
    background: rgba(255,255,255,0.12);
    align-self: stretch;
}

/* ── Main Layout ────────────────────────────────────────────────── */
.dv-layout {
    display: grid;
    grid-template-columns: 1fr 440px;
    gap: 32px;
    padding: 48px 0 80px;
    align-items: start;
}

/* ── Player Column ──────────────────────────────────────────────── */
.dv-player-col {
    position: sticky;
    top: 88px;
}

.dv-player-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0,0,0,0.08);
}

/* Video wrapper */
.dv-video-wrap {
    position: relative;
    aspect-ratio: 16/9;
    background: #0f172a;
}

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

/* Placeholder state (when no video loaded) */
.dv-video-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    transition: opacity 0.3s;
}

.dv-video-placeholder.hidden {
    opacity: 0;
    pointer-events: none;
}

.dv-play-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 0 0 rgba(99,102,241,0.4);
    animation: dv-pulse 2.5s ease-in-out infinite;
    transition: transform 0.2s;
}

.dv-play-circle:hover {
    transform: scale(1.08);
}

.dv-play-circle svg {
    width: 28px;
    height: 28px;
    color: #fff;
    margin-left: 4px;
}

@keyframes dv-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(99,102,241,0.45); }
    60%  { box-shadow: 0 0 0 20px rgba(99,102,241,0); }
    100% { box-shadow: 0 0 0 0 rgba(99,102,241,0); }
}

.dv-placeholder-text {
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
    text-align: center;
}

.dv-placeholder-title {
    color: rgba(255,255,255,0.85);
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 4px;
}

/* Category badge on video */
.dv-video-cat-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 100px;
    backdrop-filter: blur(12px);
}

/* Video number overlay */
.dv-video-num {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: rgba(0,0,0,0.55);
    color: rgba(255,255,255,0.75);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 6px;
    backdrop-filter: blur(8px);
}

/* Player info */
.dv-player-info {
    padding: 24px 28px 28px;
}

.dv-player-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.dv-cat-pill {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 100px;
}

.dv-player-num {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}

.dv-player-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 10px;
    line-height: 1.3;
}

.dv-player-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin: 0 0 24px;
}

.dv-player-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.dv-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
    text-decoration: none;
}

.dv-btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
}

.dv-btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.dv-btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.dv-btn-outline:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.dv-btn svg {
    width: 16px;
    height: 16px;
}

/* Navigation */
.dv-nav-btns {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.dv-nav-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.dv-nav-btn:hover:not(:disabled) {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
}

.dv-nav-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.dv-nav-btn svg {
    width: 16px;
    height: 16px;
}

/* Progress bar */
.dv-progress-bar {
    height: 3px;
    background: var(--border-color);
    border-radius: 2px;
    margin: 0 28px 0;
    overflow: hidden;
}

.dv-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 2px;
    transition: width 0.4s ease;
}

/* ── Sidebar Column ─────────────────────────────────────────────── */
.dv-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0,0,0,0.07);
}

/* Category filters */
.dv-cat-tabs {
    padding: 16px 16px 0;
    border-bottom: 1px solid var(--border-color);
    overflow: visible;
}

.dv-cat-tabs-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding-bottom: 0;
}

.dv-cat-tab {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 7px 12px;
    border-radius: 10px 10px 0 0;
    border: 1px solid transparent;
    border-bottom: none;
    cursor: pointer;
    background: transparent;
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
    white-space: nowrap;
    position: relative;
    bottom: -1px;
}

.dv-cat-tab:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.dv-cat-tab.active {
    color: #6366f1;
    background: var(--bg-card);
    border-color: var(--border-color);
    border-bottom-color: transparent;
}

/* Sidebar search */
.dv-sidebar-search {
    padding: 16px 16px 12px;
}

.dv-sidebar-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 9px 14px;
    transition: border-color 0.2s;
}

.dv-sidebar-search-wrap:focus-within {
    border-color: #6366f1;
}

.dv-sidebar-search-wrap svg {
    width: 15px;
    height: 15px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.dv-sidebar-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: 'Inter', sans-serif;
}

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

/* Video list */
.dv-video-list {
    flex: 1;
    overflow-y: auto;
    max-height: 640px;
    padding: 4px 8px 16px;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.dv-video-list::-webkit-scrollbar {
    width: 4px;
}

.dv-video-list::-webkit-scrollbar-track {
    background: transparent;
}

.dv-video-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

/* Category group header */
.dv-cat-group-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 10px 8px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.dv-cat-group-header::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

/* Video card in list */
.dv-vcard {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s;
    position: relative;
}

.dv-vcard:hover {
    background: var(--bg-secondary);
}

.dv-vcard.active {
    background: rgba(99,102,241,0.08);
    border: 1px solid rgba(99,102,241,0.2);
}

.dv-vcard-thumb {
    width: 80px;
    height: 52px;
    border-radius: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.dv-vcard-thumb-num {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: currentColor;
    opacity: 0.7;
}

.dv-vcard-play {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    border-radius: 8px;
}

.dv-vcard:hover .dv-vcard-play,
.dv-vcard.active .dv-vcard-play {
    opacity: 1;
}

.dv-vcard-play svg {
    width: 18px;
    height: 18px;
    color: #fff;
}

.dv-vcard-body {
    flex: 1;
    min-width: 0;
}

.dv-vcard-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.dv-vcard.active .dv-vcard-title {
    color: #6366f1;
}

.dv-vcard-sub {
    font-size: 0.76rem;
    color: var(--text-muted);
}

.dv-vcard-num-badge {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dv-vcard.active .dv-vcard-num-badge {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
}

/* No results */
.dv-no-results {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.dv-no-results svg {
    width: 40px;
    height: 40px;
    margin-bottom: 12px;
    opacity: 0.4;
}

/* ── Category Color System ──────────────────────────────────────── */
/* Setup: Indigo */
.dv-cat-setup    { --dv-cat-bg: #ede9fe; --dv-cat-color: #6d28d9; --dv-cat-border: #c4b5fd; }
/* Sales: Emerald */
.dv-cat-sales    { --dv-cat-bg: #d1fae5; --dv-cat-color: #065f46; --dv-cat-border: #6ee7b7; }
/* Purchases: Amber */
.dv-cat-purchases { --dv-cat-bg: #fef3c7; --dv-cat-color: #92400e; --dv-cat-border: #fcd34d; }
/* Banking: Sky */
.dv-cat-banking  { --dv-cat-bg: #e0f2fe; --dv-cat-color: #075985; --dv-cat-border: #7dd3fc; }
/* Accounting: Rose */
.dv-cat-accounting { --dv-cat-bg: #ffe4e6; --dv-cat-color: #9f1239; --dv-cat-border: #fda4af; }
/* Admin: Slate */
.dv-cat-admin    { --dv-cat-bg: #f1f5f9; --dv-cat-color: #334155; --dv-cat-border: #cbd5e1; }

.dv-cat-pill,
.dv-cat-group-header .dv-cat-dot,
.dv-video-cat-badge {
    background: var(--dv-cat-bg, #ede9fe);
    color: var(--dv-cat-color, #6d28d9);
    border: 1px solid var(--dv-cat-border, #c4b5fd);
}

.dv-vcard-thumb {
    background: var(--dv-cat-bg, #ede9fe);
    color: var(--dv-cat-color, #6d28d9);
}

/* ── CTA Section ────────────────────────────────────────────────── */
.dv-cta {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    padding: 64px 0;
    text-align: center;
    margin-top: 32px;
}

.dv-cta h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 700;
    color: #fff;
    margin: 0 0 12px;
}

.dv-cta p {
    font-size: 1rem;
    color: rgba(255,255,255,0.75);
    margin: 0 0 32px;
}

.dv-cta-btns {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.dv-cta-btn-white {
    background: #fff;
    color: #6366f1;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.dv-cta-btn-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.dv-cta-btn-ghost {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.dv-cta-btn-ghost:hover {
    background: rgba(255,255,255,0.25);
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .dv-layout {
        grid-template-columns: 1fr;
    }

    .dv-player-col {
        position: static;
    }

    .dv-video-list {
        max-height: 420px;
    }
}

@media (max-width: 640px) {
    .dv-hero {
        padding: 60px 0 48px;
    }

    .dv-hero-stats {
        gap: 24px;
    }

    .dv-player-info {
        padding: 18px 18px 20px;
    }

    .dv-player-title {
        font-size: 1.15rem;
    }

    .dv-player-actions {
        flex-direction: column;
    }

    .dv-btn {
        justify-content: center;
    }

    .dv-layout {
        padding: 28px 0 60px;
    }
}

/* ── Dark Mode ──────────────────────────────────────────────────── */
[data-theme="dark"] .dv-cat-setup    { --dv-cat-bg: rgba(109,40,217,0.18); --dv-cat-color: #a78bfa; --dv-cat-border: rgba(167,139,250,0.3); }
[data-theme="dark"] .dv-cat-sales    { --dv-cat-bg: rgba(6,95,70,0.2);    --dv-cat-color: #34d399; --dv-cat-border: rgba(52,211,153,0.3); }
[data-theme="dark"] .dv-cat-purchases { --dv-cat-bg: rgba(146,64,14,0.2); --dv-cat-color: #fcd34d; --dv-cat-border: rgba(252,211,77,0.3); }
[data-theme="dark"] .dv-cat-banking  { --dv-cat-bg: rgba(7,89,133,0.2);   --dv-cat-color: #38bdf8; --dv-cat-border: rgba(56,189,248,0.3); }
[data-theme="dark"] .dv-cat-accounting { --dv-cat-bg: rgba(159,18,57,0.2); --dv-cat-color: #fb7185; --dv-cat-border: rgba(251,113,133,0.3); }
[data-theme="dark"] .dv-cat-admin    { --dv-cat-bg: rgba(51,65,85,0.3);   --dv-cat-color: #94a3b8; --dv-cat-border: rgba(148,163,184,0.3); }

[data-theme="dark"] .dv-progress-bar {
    background: rgba(255,255,255,0.08);
}
