/* =============================================================
   EXPLORE APP — "Editorial Exhibition" Theme
   Demosmith Explore: Browse & Like Shared Demo Videos
   Separate from landing page styles.css
   ============================================================= */

/* ---------- Google Font: Outfit (UI body, distinct from landing) ---------- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

/* =========================
   THEME TOKENS
   ========================= */
:root {
    /* --- Light (default) --- */
    --ex-bg:             #F6F5F1;
    --ex-bg-warm:        #EEEDE8;
    --ex-bg-card:        #FFFFFF;
    --ex-bg-card-hover:  #FAFAF8;
    --ex-bg-nav:         rgba(246,245,241,0.80);
    --ex-bg-input:       #FFFFFF;
    --ex-bg-chip:        #FFFFFF;
    --ex-bg-chip-active: #1A1A18;
    --ex-surface:        #F0EFE9;
    --ex-border:         rgba(0,0,0,0.07);
    --ex-border-hover:   rgba(0,0,0,0.13);
    --ex-text:           #1A1A18;
    --ex-text-secondary: #6B6B66;
    --ex-text-muted:     #9E9E97;
    --ex-text-chip-active: #FFFFFF;
    --ex-accent:         #4043FF;
    --ex-accent-soft:    rgba(64,67,255,0.08);
    --ex-accent-glow:    rgba(64,67,255,0.20);
    --ex-like:           #FF3366;
    --ex-like-soft:      rgba(255,51,102,0.08);
    --ex-like-glow:      rgba(255,51,102,0.25);
    --ex-shadow-card:    0 1px 3px rgba(0,0,0,0.04), 0 6px 24px rgba(0,0,0,0.05);
    --ex-shadow-hover:   0 8px 40px rgba(0,0,0,0.10), 0 1px 3px rgba(0,0,0,0.06);
    --ex-shadow-nav:     0 1px 0 rgba(0,0,0,0.05);
    --ex-radius-xs:      6px;
    --ex-radius-sm:      10px;
    --ex-radius-md:      14px;
    --ex-radius-lg:      18px;
    --ex-radius-xl:      24px;
    --ex-radius-card:    16px;
    --ex-font-display:   'Instrument Serif', Georgia, serif;
    --ex-font-heading:   'Instrument Sans', sans-serif;
    --ex-font-body:      'Outfit', -apple-system, sans-serif;
    --ex-font-mono:      'JetBrains Mono', monospace;
    --ex-ease:           cubic-bezier(0.16, 1, 0.3, 1);
    --ex-ease-out:       cubic-bezier(0.33, 1, 0.68, 1);
    --ex-grain-opacity:  0.025;
    --ex-play-bg:        rgba(255,255,255,0.92);
    --ex-play-fg:        #1A1A18;
    --ex-theme-icon-sun: 0;
    --ex-theme-icon-moon: 1;
}

/* --- Dark mode --- */
[data-theme="dark"] {
    --ex-bg:             #111110;
    --ex-bg-warm:        #191918;
    --ex-bg-card:        #1C1C1A;
    --ex-bg-card-hover:  #222220;
    --ex-bg-nav:         rgba(17,17,16,0.82);
    --ex-bg-input:       #1C1C1A;
    --ex-bg-chip:        #1C1C1A;
    --ex-bg-chip-active: #F6F5F1;
    --ex-surface:        #232322;
    --ex-border:         rgba(255,255,255,0.07);
    --ex-border-hover:   rgba(255,255,255,0.14);
    --ex-text:           #EDEDE8;
    --ex-text-secondary: #8A8A83;
    --ex-text-muted:     #5C5C56;
    --ex-text-chip-active: #111110;
    --ex-accent:         #636BFF;
    --ex-accent-soft:    rgba(99,107,255,0.12);
    --ex-accent-glow:    rgba(99,107,255,0.25);
    --ex-like:           #FF4D7A;
    --ex-like-soft:      rgba(255,77,122,0.12);
    --ex-like-glow:      rgba(255,77,122,0.30);
    --ex-shadow-card:    0 1px 3px rgba(0,0,0,0.15), 0 6px 24px rgba(0,0,0,0.18);
    --ex-shadow-hover:   0 8px 40px rgba(0,0,0,0.30), 0 1px 3px rgba(0,0,0,0.15);
    --ex-shadow-nav:     0 1px 0 rgba(255,255,255,0.04);
    --ex-grain-opacity:  0.04;
    --ex-play-bg:        rgba(0,0,0,0.70);
    --ex-play-fg:        #FFFFFF;
    --ex-theme-icon-sun: 1;
    --ex-theme-icon-moon: 0;
}

/* =========================
   BASE RESET (scoped)
   ========================= */
html, body {
    margin: 0;
    padding: 0;
    background: var(--ex-bg);
    min-height: 100%;
}

.explore-app {
    margin: 0;
    padding: 0;
    background: var(--ex-bg);
    color: var(--ex-text);
    font-family: var(--ex-font-body);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.55;
    transition: background 0.45s var(--ex-ease), color 0.45s var(--ex-ease);
    position: relative;
    overflow-x: hidden;
}

.explore-app *, .explore-app *::before, .explore-app *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.explore-app a { color: inherit; text-decoration: none; }
.explore-app button { font-family: inherit; }
.explore-app img { display: block; max-width: 100%; }

/* --- Film grain overlay --- */
.explore-app::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: var(--ex-grain-opacity);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 200px 200px;
    transition: opacity 0.45s var(--ex-ease);
}

/* =========================
   NAVIGATION
   ========================= */
.ex-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--ex-bg-nav);
    backdrop-filter: blur(24px) saturate(1.6);
    -webkit-backdrop-filter: blur(24px) saturate(1.6);
    box-shadow: var(--ex-shadow-nav);
    transition: background 0.45s var(--ex-ease), box-shadow 0.45s var(--ex-ease);
}

.ex-nav-inner {
    max-width: 1380px;
    margin: 0 auto;
    padding: 0 32px;
    height: 68px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.ex-nav-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.ex-logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ex-logo img {
    width: 26px;
    height: 26px;
    object-fit: contain;
}

.ex-logo-text {
    font-family: var(--ex-font-heading);
    font-weight: 650;
    font-size: 17px;
    letter-spacing: -0.025em;
    color: var(--ex-text);
}

.ex-nav-sep {
    font-size: 20px;
    color: var(--ex-text-muted);
    font-weight: 300;
    opacity: 0.5;
    user-select: none;
}

.ex-nav-title {
    font-family: var(--ex-font-display);
    font-size: 19px;
    font-style: italic;
    color: var(--ex-text-secondary);
    letter-spacing: 0.01em;
}

/* Search */
.ex-search {
    flex: 1;
    max-width: 420px;
    margin: 0 auto;
    position: relative;
}

.ex-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 17px;
    height: 17px;
    color: var(--ex-text-muted);
    pointer-events: none;
    stroke-width: 2.2;
}

.ex-search input {
    width: 100%;
    height: 42px;
    padding: 0 16px 0 42px;
    font-family: var(--ex-font-body);
    font-size: 14px;
    font-weight: 400;
    color: var(--ex-text);
    background: var(--ex-bg-input);
    border: 1.5px solid var(--ex-border);
    border-radius: 100px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.45s var(--ex-ease);
}

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

.ex-search input:focus {
    border-color: var(--ex-accent);
    box-shadow: 0 0 0 4px var(--ex-accent-soft);
}

/* Nav right */
.ex-nav-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.ex-nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--ex-text-secondary);
    padding: 7px 14px;
    border-radius: 10px;
    transition: color 0.2s, background 0.2s;
}

.ex-nav-link:hover {
    color: var(--ex-text);
    background: var(--ex-surface);
}

/* Theme toggle */
.ex-theme-toggle {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1.5px solid var(--ex-border);
    background: var(--ex-bg-card);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, background 0.45s var(--ex-ease);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.ex-theme-toggle:hover {
    border-color: var(--ex-border-hover);
}

.ex-theme-toggle svg {
    width: 18px;
    height: 18px;
    position: absolute;
    transition: transform 0.4s var(--ex-ease), opacity 0.3s;
}

.ex-theme-toggle .sun-icon {
    opacity: var(--ex-theme-icon-sun);
    transform: rotate(calc(var(--ex-theme-icon-sun) * 0deg + (1 - var(--ex-theme-icon-sun)) * -90deg)) scale(var(--ex-theme-icon-sun));
    color: #F59E0B;
}

.ex-theme-toggle .moon-icon {
    opacity: var(--ex-theme-icon-moon);
    transform: rotate(calc(var(--ex-theme-icon-moon) * 0deg + (1 - var(--ex-theme-icon-moon)) * 90deg)) scale(var(--ex-theme-icon-moon));
    color: var(--ex-text-secondary);
}

/* CTA */
.ex-nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 38px;
    padding: 0 18px;
    font-size: 13.5px;
    font-weight: 600;
    color: #fff !important;
    background: #1A1A18;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s var(--ex-ease);
    white-space: nowrap;
}

[data-theme="dark"] .ex-nav-cta {
    background: #EDEDE8;
    color: #111110 !important;
}

.ex-nav-cta:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.ex-nav-cta svg { flex-shrink: 0; }

/* Hamburger */
.ex-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
}

.ex-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ex-text-secondary);
    border-radius: 2px;
    transition: 0.25s var(--ex-ease);
}

/* =========================
   HERO MARQUEE
   ========================= */
.ex-hero {
    padding: 56px 32px 0;
    text-align: center;
    position: relative;
}

.ex-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--ex-font-mono);
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ex-accent);
    margin-bottom: 18px;
}

.ex-hero-eyebrow::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ex-accent);
    animation: ex-pulse 2s ease-in-out infinite;
}

@keyframes ex-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
}

.ex-hero h1 {
    font-family: var(--ex-font-display);
    font-weight: 400;
    font-size: clamp(40px, 6.5vw, 80px);
    line-height: 1.05;
    letter-spacing: -0.025em;
    color: var(--ex-text);
    margin-bottom: 16px;
}

.ex-hero h1 em {
    font-style: italic;
    color: var(--ex-accent);
}

.ex-hero-sub {
    font-size: 17px;
    color: var(--ex-text-secondary);
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.6;
    font-weight: 400;
}

/* =========================
   FILTER BAR
   ========================= */
.ex-filters-wrap {
    max-width: 1380px;
    margin: 0 auto;
    padding: 36px 32px 0;
}

.ex-filters-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.ex-filters {
    display: flex;
    align-items: center;
    gap: 7px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 2px;
}

.ex-filters::-webkit-scrollbar { display: none; }

.ex-chip {
    flex-shrink: 0;
    height: 36px;
    padding: 0 18px;
    font-family: var(--ex-font-body);
    font-size: 13.5px;
    font-weight: 500;
    color: var(--ex-text-secondary);
    background: var(--ex-bg-chip);
    border: 1.5px solid var(--ex-border);
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.2s var(--ex-ease);
    white-space: nowrap;
}

.ex-chip:hover {
    color: var(--ex-text);
    border-color: var(--ex-border-hover);
    background: var(--ex-bg-card-hover);
}

.ex-chip.active {
    color: var(--ex-text-chip-active);
    background: var(--ex-bg-chip-active);
    border-color: var(--ex-bg-chip-active);
}

/* Right side: count + sort */
.ex-toolbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.ex-count {
    font-family: var(--ex-font-mono);
    font-size: 12px;
    color: var(--ex-text-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.ex-sort-group {
    display: flex;
    gap: 2px;
    background: var(--ex-surface);
    border-radius: 10px;
    padding: 3px;
}

.ex-sort-btn {
    height: 30px;
    padding: 0 14px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--ex-text-muted);
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s var(--ex-ease);
}

.ex-sort-btn:hover { color: var(--ex-text-secondary); }

.ex-sort-btn.active {
    color: var(--ex-text);
    background: var(--ex-bg-card);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* =========================
   DEMO GRID
   ========================= */
.ex-grid-wrap {
    max-width: 1380px;
    margin: 0 auto;
    padding: 24px 32px 100px;
}

.ex-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* =========================
   DEMO CARD
   ========================= */
.ex-card {
    display: block;
    background: var(--ex-bg-card);
    border: 1.5px solid var(--ex-border);
    border-radius: var(--ex-radius-card);
    overflow: hidden;
    box-shadow: var(--ex-shadow-card);
    cursor: pointer;
    transition:
        transform 0.45s var(--ex-ease),
        box-shadow 0.45s var(--ex-ease),
        border-color 0.25s;
    will-change: transform;
    animation: ex-card-in 0.55s var(--ex-ease) backwards;
}

.ex-card:hover {
    transform: translateY(-6px) scale(1.008);
    box-shadow: var(--ex-shadow-hover);
    border-color: var(--ex-border-hover);
}

/* Staggered entrance */
.ex-card:nth-child(1)  { animation-delay: 0.04s; }
.ex-card:nth-child(2)  { animation-delay: 0.08s; }
.ex-card:nth-child(3)  { animation-delay: 0.12s; }
.ex-card:nth-child(4)  { animation-delay: 0.16s; }
.ex-card:nth-child(5)  { animation-delay: 0.20s; }
.ex-card:nth-child(6)  { animation-delay: 0.24s; }
.ex-card:nth-child(7)  { animation-delay: 0.28s; }
.ex-card:nth-child(8)  { animation-delay: 0.32s; }
.ex-card:nth-child(9)  { animation-delay: 0.36s; }
.ex-card:nth-child(10) { animation-delay: 0.40s; }
.ex-card:nth-child(11) { animation-delay: 0.44s; }
.ex-card:nth-child(12) { animation-delay: 0.48s; }

@keyframes ex-card-in {
    from { opacity: 0; transform: translateY(24px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Thumbnail */
.ex-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--ex-surface);
}

.ex-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s var(--ex-ease);
}

.ex-card:hover .ex-thumb img {
    transform: scale(1.045);
}

/* Play button */
.ex-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s var(--ex-ease);
}

.ex-card:hover .ex-play { opacity: 1; }

.ex-play-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--ex-play-bg);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 24px rgba(0,0,0,0.15);
    transition: transform 0.35s var(--ex-ease);
}

.ex-card:hover .ex-play-circle {
    transform: scale(1.06);
}

.ex-play-circle svg {
    width: 22px;
    height: 22px;
    fill: var(--ex-play-fg);
    margin-left: 3px;
}

/* Duration badge */
.ex-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    padding: 4px 9px;
    font-family: var(--ex-font-mono);
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(4px);
    border-radius: 7px;
    letter-spacing: 0.03em;
}

/* Card body */
.ex-card-body {
    padding: 16px 18px 18px;
}

.ex-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.ex-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1.5px solid var(--ex-border);
}

.ex-card-creator {
    font-size: 13px;
    font-weight: 500;
    color: var(--ex-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ex-card-title {
    font-family: var(--ex-font-heading);
    font-size: 16px;
    font-weight: 600;
    color: var(--ex-text);
    line-height: 1.35;
    letter-spacing: -0.015em;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.ex-tags {
    display: flex;
    gap: 5px;
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

.ex-tag {
    flex-shrink: 0;
    font-size: 11.5px;
    font-weight: 500;
    color: var(--ex-text-muted);
    background: var(--ex-surface);
    padding: 4px 10px;
    border-radius: 7px;
    white-space: nowrap;
    transition: color 0.2s, background 0.45s var(--ex-ease);
}

/* Language badge on thumbnail */
.ex-tag-lang {
    position: absolute;
    top: 10px;
    left: 10px;
    font-family: var(--ex-font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #fff;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(4px);
    padding: 3px 8px;
    border-radius: 6px;
    z-index: 1;
}

/* ---------- LIKE BUTTON ---------- */
.ex-like-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    background: none;
    border: 1.5px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    color: var(--ex-text-muted);
    transition: all 0.2s var(--ex-ease);
    position: relative;
}

.ex-like-btn:hover {
    color: var(--ex-like);
    background: var(--ex-like-soft);
    border-color: transparent;
}

.ex-like-btn.liked {
    color: var(--ex-like);
}

.ex-like-btn.liked .ex-heart {
    fill: var(--ex-like);
    stroke: var(--ex-like);
    animation: ex-heart-bounce 0.4s var(--ex-ease);
}

.ex-heart {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    transition: fill 0.2s, stroke 0.2s, transform 0.2s;
}

.ex-like-count {
    font-family: var(--ex-font-body);
    font-size: 13px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

@keyframes ex-heart-bounce {
    0%   { transform: scale(1); }
    25%  { transform: scale(1.35); }
    50%  { transform: scale(0.88); }
    75%  { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Burst particles on like */
.ex-like-btn.liked::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--ex-like-glow) 0%, transparent 70%);
    animation: ex-burst 0.5s var(--ex-ease-out) forwards;
    pointer-events: none;
}

@keyframes ex-burst {
    0%   { opacity: 0.7; transform: scale(0.5); }
    100% { opacity: 0; transform: scale(2.2); }
}

/* =========================
   PAGINATION
   ========================= */
.ex-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 40px 0 0;
}

.ex-page-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 20px;
    font-family: var(--ex-font-body);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ex-text-secondary);
    background: var(--ex-bg-card);
    border: 1.5px solid var(--ex-border);
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.2s var(--ex-ease);
}

.ex-page-btn:hover:not(:disabled) {
    color: var(--ex-text);
    border-color: var(--ex-border-hover);
}

.ex-page-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.ex-page-info {
    font-family: var(--ex-font-mono);
    font-size: 12px;
    color: var(--ex-text-muted);
    font-variant-numeric: tabular-nums;
}

/* =========================
   SKELETON LOADING
   ========================= */
.ex-skeleton {
    background: linear-gradient(90deg, var(--ex-surface) 25%, var(--ex-bg-card-hover) 50%, var(--ex-surface) 75%);
    background-size: 200% 100%;
    animation: ex-shimmer 1.5s ease-in-out infinite;
}

.ex-skeleton-card {
    pointer-events: none;
    border-color: transparent !important;
    box-shadow: none !important;
}

@keyframes ex-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================================
   INDIVIDUAL DEMO VIEW
   ============================================================ */
.ex-demo-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 40px 80px;
    background: var(--ex-bg);
}

/* Back link */
.ex-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ex-text-muted);
    margin-bottom: 20px;
    transition: color 0.2s;
}

.ex-back:hover {
    color: var(--ex-text);
}

.ex-back svg {
    width: 15px;
    height: 15px;
}

/* Video wrapper */
.ex-video-wrap {
    position: relative;
    border-radius: var(--ex-radius-xl);
    overflow: hidden;
    background: #000;
    aspect-ratio: 16 / 9;
    box-shadow: 0 12px 48px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.08);
}

[data-theme="dark"] .ex-video-wrap {
    box-shadow: 0 12px 48px rgba(0,0,0,0.4), 0 2px 8px rgba(0,0,0,0.2);
}

.ex-video-wrap video,
.ex-video-wrap media-player {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: var(--ex-radius-xl);
    overflow: hidden;
}

/* Detail page like button (larger) */
.ex-like-lg {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    height: 44px;
    padding: 0 22px;
    font-family: var(--ex-font-body);
    font-size: 14.5px;
    font-weight: 600;
    color: var(--ex-text-secondary);
    background: var(--ex-bg-card);
    border: 1.5px solid var(--ex-border);
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.25s var(--ex-ease);
    position: relative;
}

.ex-like-lg:hover {
    color: var(--ex-like);
    border-color: var(--ex-like);
    background: var(--ex-like-soft);
}

.ex-like-lg.liked {
    color: #fff;
    background: var(--ex-like);
    border-color: var(--ex-like);
    box-shadow: 0 4px 16px var(--ex-like-glow);
}

.ex-like-lg.liked .ex-heart {
    fill: #fff;
    stroke: #fff;
    animation: ex-heart-bounce 0.4s var(--ex-ease);
}

.ex-like-lg .ex-heart {
    width: 19px;
    height: 19px;
}

.ex-views {
    font-size: 13.5px;
    color: var(--ex-text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    font-variant-numeric: tabular-nums;
}

.ex-views svg {
    width: 17px;
    height: 17px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
}

/* Share button */
.ex-share {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 42px;
    padding: 0 20px;
    font-family: var(--ex-font-body);
    font-size: 13.5px;
    font-weight: 500;
    color: var(--ex-text-secondary);
    background: var(--ex-bg-card);
    border: 1.5px solid var(--ex-border);
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.2s;
}

.ex-share:hover {
    color: var(--ex-text);
    border-color: var(--ex-border-hover);
}

.ex-share svg {
    width: 16px;
    height: 16px;
}

.ex-share-toast {
    font-weight: 600;
    color: var(--ex-accent);
}

/* ---- Detail content section (below video) ---- */
.ex-detail-content {
    padding: 0;
    animation: ex-detail-in 0.4s var(--ex-ease) backwards;
    animation-delay: 0.05s;
}

@keyframes ex-detail-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ex-detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--ex-border);
    transition: border-color 0.45s var(--ex-ease);
}

.ex-detail-header-info {
    flex: 1;
    min-width: 0;
}

.ex-detail-header h1 {
    font-family: var(--ex-font-display);
    font-weight: 400;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--ex-text);
    margin-bottom: 8px;
}

.ex-detail-desc {
    font-size: 15px;
    line-height: 1.65;
    color: var(--ex-text-secondary);
    max-width: 640px;
}

.ex-detail-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    padding-top: 4px;
}

/* Smaller action buttons in new layout */
.ex-detail-actions .ex-like-lg {
    height: 38px;
    padding: 0 18px;
    font-size: 13.5px;
}

.ex-detail-actions .ex-like-lg .ex-heart {
    width: 17px;
    height: 17px;
}

.ex-detail-actions .ex-share {
    height: 38px;
    padding: 0 16px;
    font-size: 13px;
}

.ex-detail-actions .ex-views {
    font-size: 13px;
}

/* ---- Detail metadata strip ---- */
.ex-detail-meta-strip {
    display: flex;
    align-items: center;
    padding: 22px 0;
    border-bottom: 1px solid var(--ex-border);
    transition: border-color 0.45s var(--ex-ease);
}

.ex-detail-meta-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 0 32px;
}

.ex-detail-meta-item:first-child {
    padding-left: 0;
}

.ex-detail-meta-item:not(:last-child) {
    border-right: 1px solid var(--ex-border);
}

.ex-detail-meta-label {
    font-family: var(--ex-font-mono);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ex-text-muted);
}

.ex-detail-meta-val {
    font-size: 14.5px;
    font-weight: 550;
    color: var(--ex-text);
}

/* Detail tags */
.ex-dtags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.ex-dtag {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--ex-text-secondary);
    background: var(--ex-surface);
    padding: 6px 14px;
    border-radius: 100px;
    transition: color 0.2s, background 0.45s var(--ex-ease);
    cursor: default;
}

/* ---- Detail tags row ---- */
.ex-detail-tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 20px 0;
    border-bottom: 1px solid var(--ex-border);
    transition: border-color 0.45s var(--ex-ease);
}

/* ---- Detail CTA banner ---- */
.ex-detail-cta-banner {
    margin-top: 28px;
    padding: 28px 36px;
    background: var(--ex-surface);
    border: 1px solid var(--ex-border);
    border-radius: var(--ex-radius-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    transition: background 0.45s var(--ex-ease), border-color 0.45s var(--ex-ease);
}

.ex-detail-cta-banner p {
    font-size: 15px;
    font-weight: 500;
    color: var(--ex-text-secondary);
    line-height: 1.55;
}

.ex-detail-cta-banner a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 40px;
    padding: 0 24px;
    font-size: 13.5px;
    font-weight: 600;
    color: #fff !important;
    background: var(--ex-text);
    border-radius: 10px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: opacity 0.2s, transform 0.2s var(--ex-ease);
}

[data-theme="dark"] .ex-detail-cta-banner a {
    background: var(--ex-accent);
}

.ex-detail-cta-banner a:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

/* =========================
   THEATER LAYOUT (video + transcript)
   ========================= */
.ex-theater {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 0;
    border-radius: var(--ex-radius-lg);
    overflow: hidden;
    border: 1.5px solid var(--ex-border);
    background: var(--ex-bg-card);
    box-shadow: var(--ex-shadow-card);
    margin-bottom: 28px;
    max-height: 560px;
    transition: border-color 0.45s var(--ex-ease), background 0.45s var(--ex-ease), box-shadow 0.45s var(--ex-ease);
}

.ex-theater .ex-video-wrap {
    border-radius: 0;
    box-shadow: none;
    aspect-ratio: auto;
    min-height: 100%;
    background: #0A0A09;
}

.ex-theater .ex-video-wrap video,
.ex-theater .ex-video-wrap img {
    border-radius: 0 !important;
    object-fit: contain;
}

/* Transcript sidebar panel */
.ex-transcript-panel {
    display: flex;
    flex-direction: column;
    background: var(--ex-bg-card);
    border-left: 1px solid var(--ex-border);
    overflow: hidden;
    transition: background 0.45s var(--ex-ease), border-color 0.45s var(--ex-ease);
}

.ex-transcript-panel-tabs {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding: 0 18px;
    height: 46px;
    border-bottom: 1px solid var(--ex-border);
}

.ex-panel-tab {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0;
    font-family: var(--ex-font-heading);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ex-text);
    background: none;
    border: none;
    cursor: default;
    letter-spacing: -0.01em;
}

.ex-panel-tab svg {
    color: var(--ex-text-muted);
}

.ex-copy-transcript {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    font-family: var(--ex-font-body);
    font-size: 12px;
    font-weight: 500;
    color: var(--ex-text-muted);
    background: none;
    border: 1px solid var(--ex-border);
    border-radius: 7px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.ex-copy-transcript:hover {
    color: var(--ex-text-secondary);
    border-color: var(--ex-border-hover);
    background: var(--ex-surface);
}

.ex-copy-transcript.copied {
    color: var(--ex-accent);
    border-color: var(--ex-accent);
}

.ex-transcript-panel .ex-transcript-search {
    flex-shrink: 0;
    padding: 10px 16px;
    border-bottom: 1px solid var(--ex-border);
    position: relative;
}

.ex-transcript-panel .ex-transcript-search input {
    width: 100%;
    height: 34px;
    padding: 0 12px 0 34px;
    font-family: var(--ex-font-body);
    font-size: 13px;
    color: var(--ex-text);
    background: var(--ex-surface);
    border: 1px solid var(--ex-border);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ex-transcript-panel .ex-transcript-search input::placeholder {
    color: var(--ex-text-muted);
}

.ex-transcript-panel .ex-transcript-search input:focus {
    border-color: var(--ex-accent);
    box-shadow: 0 0 0 3px var(--ex-accent-soft);
}

.ex-transcript-panel .ex-transcript-search svg {
    position: absolute;
    left: 28px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    color: var(--ex-text-muted);
    pointer-events: none;
}

.ex-transcript-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow-y: auto;
    flex: 1;
    padding: 4px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--ex-border) transparent;
}

.ex-transcript-list::-webkit-scrollbar {
    width: 5px;
}

.ex-transcript-list::-webkit-scrollbar-track {
    background: transparent;
}

.ex-transcript-list::-webkit-scrollbar-thumb {
    background: var(--ex-border);
    border-radius: 4px;
}

.ex-transcript-line {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 14px 20px;
    cursor: pointer;
    transition: background 0.12s;
    text-decoration: none;
    border-left: 2.5px solid transparent;
}

.ex-transcript-line:hover {
    background: var(--ex-surface);
}

.ex-transcript-line.active {
    background: var(--ex-accent-soft);
    border-left-color: var(--ex-accent);
}

.ex-transcript-line.active .ex-transcript-time {
    color: var(--ex-accent);
    opacity: 1;
}

.ex-transcript-time {
    flex-shrink: 0;
    font-family: var(--ex-font-mono);
    font-size: 12px;
    font-weight: 500;
    color: var(--ex-accent);
    min-width: 38px;
    padding-top: 3px;
    font-variant-numeric: tabular-nums;
    opacity: 0.55;
    transition: opacity 0.12s, color 0.12s;
}

.ex-transcript-line:hover .ex-transcript-time {
    opacity: 0.9;
}

.ex-transcript-text {
    font-family: var(--ex-font-body);
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--ex-text);
    letter-spacing: 0.002em;
}

/* Transcript empty/loading states */
.ex-transcript-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--ex-text-muted);
}

.ex-transcript-empty svg {
    width: 40px;
    height: 40px;
    margin-bottom: 12px;
    opacity: 0.4;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
}

.ex-transcript-empty h4 {
    font-family: var(--ex-font-heading);
    font-size: 16px;
    font-weight: 600;
    color: var(--ex-text-secondary);
    margin-bottom: 4px;
}

.ex-transcript-empty p {
    font-size: 14px;
}

/* Transcript search */
.ex-transcript-search {
    position: relative;
    margin-bottom: 16px;
}

.ex-transcript-search input {
    width: 100%;
    height: 40px;
    padding: 0 16px 0 38px;
    font-family: var(--ex-font-body);
    font-size: 13.5px;
    color: var(--ex-text);
    background: var(--ex-bg-card);
    border: 1.5px solid var(--ex-border);
    border-radius: var(--ex-radius-sm);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.45s var(--ex-ease);
}

.ex-transcript-search input::placeholder {
    color: var(--ex-text-muted);
}

.ex-transcript-search input:focus {
    border-color: var(--ex-accent);
    box-shadow: 0 0 0 3px var(--ex-accent-soft);
}

.ex-transcript-search svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    color: var(--ex-text-muted);
    pointer-events: none;
}

@media (max-width: 1080px) {
    .ex-theater {
        grid-template-columns: 1fr;
        max-height: none;
    }

    .ex-theater .ex-video-wrap {
        min-height: auto;
        aspect-ratio: 16/9;
    }

    .ex-transcript-panel {
        border-left: none;
        border-top: 1px solid var(--ex-border);
        max-height: 300px;
    }
}

@media (max-width: 768px) {
    .ex-demo-page {
        padding: 16px 16px 60px;
    }

    .ex-theater {
        border-radius: var(--ex-radius-md);
    }

    .ex-transcript-panel {
        max-height: 240px;
    }

    .ex-transcript-line {
        padding: 10px 14px;
        gap: 10px;
    }

    .ex-transcript-time {
        font-size: 11px;
        min-width: 34px;
    }

    .ex-transcript-text {
        font-size: 12.5px;
    }

    .ex-detail-header {
        flex-direction: column;
        gap: 16px;
    }

    .ex-detail-header h1 {
        font-size: 24px;
    }

    .ex-detail-actions {
        flex-wrap: wrap;
        gap: 8px;
    }

    .ex-detail-meta-strip {
        flex-wrap: wrap;
        gap: 16px;
        padding: 16px 0;
    }

    .ex-detail-meta-item {
        padding: 0;
        border-right: none !important;
    }

    .ex-detail-cta-banner {
        flex-direction: column;
        text-align: center;
        padding: 24px 20px;
        gap: 16px;
    }
}

/* =========================
   FOOTER
   ========================= */
.ex-footer {
    margin-top: 60px;
    padding: 56px 40px 0;
    background: var(--ex-bg-warm);
    border-top: 1px solid var(--ex-border);
    transition: background 0.45s var(--ex-ease), border-color 0.45s var(--ex-ease);
}

.ex-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 64px;
    padding-bottom: 48px;
}

.ex-footer-brand {
    flex: 0 0 260px;
}

.ex-footer-desc {
    margin-top: 14px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--ex-text-muted);
}

.ex-footer-links {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.ex-footer-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ex-footer-col h4 {
    font-family: var(--ex-font-heading);
    font-size: 13px;
    font-weight: 600;
    color: var(--ex-text);
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.ex-footer-col a {
    font-size: 13.5px;
    color: var(--ex-text-muted);
    transition: color 0.15s;
}

.ex-footer-col a:hover {
    color: var(--ex-text);
}

.ex-footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    border-top: 1px solid var(--ex-border);
}

.ex-footer-bottom p {
    font-size: 13px;
    color: var(--ex-text-muted);
}

.ex-footer-social {
    display: flex;
    gap: 12px;
}

.ex-footer-social a {
    color: var(--ex-text-muted);
    transition: color 0.15s;
}

.ex-footer-social a:hover {
    color: var(--ex-text);
}

@media (max-width: 1024px) {
    .ex-footer-inner {
        flex-direction: column;
        gap: 40px;
    }

    .ex-footer-brand {
        flex: none;
    }

    .ex-footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .ex-footer {
        padding: 40px 20px 0;
    }

    .ex-footer-links {
        grid-template-columns: 1fr 1fr;
        gap: 28px;
    }

    .ex-footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
        padding: 16px 0;
    }
}

/* =========================
   MOBILE MENU
   ========================= */
.ex-mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: var(--ex-bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: background 0.45s var(--ex-ease);
}

.ex-mobile-menu.open { display: flex; }

.ex-mobile-menu a {
    font-family: var(--ex-font-heading);
    font-size: 22px;
    font-weight: 500;
    color: var(--ex-text-secondary);
    padding: 14px 28px;
    border-radius: 14px;
    transition: color 0.2s, background 0.2s;
}

.ex-mobile-menu a:hover {
    color: var(--ex-text);
    background: var(--ex-surface);
}

.ex-mobile-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    color: var(--ex-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: color 0.2s, background 0.2s;
}

.ex-mobile-close:hover {
    color: var(--ex-text);
    background: var(--ex-surface);
}

/* =========================
   EMPTY STATE
   ========================= */
.ex-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 24px;
}

.ex-empty svg {
    width: 52px;
    height: 52px;
    color: var(--ex-text-muted);
    opacity: 0.4;
    margin-bottom: 16px;
}

.ex-empty h3 {
    font-family: var(--ex-font-heading);
    font-size: 18px;
    font-weight: 600;
    color: var(--ex-text-secondary);
    margin-bottom: 6px;
}

.ex-empty p {
    font-size: 14px;
    color: var(--ex-text-muted);
}

/* =========================
   VIDSTACK OVERRIDES
   ========================= */
.ex-video-wrap media-player {
    --media-brand: var(--ex-accent);
}

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 1080px) {
    .ex-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

@media (max-width: 768px) {
    .ex-nav-inner { height: 58px; padding: 0 18px; }
    .ex-search { display: none; }
    .ex-nav-link { display: none; }
    .ex-nav-cta { display: none; }
    .ex-hamburger { display: flex; }

    .ex-hero { padding: 40px 18px 0; }
    .ex-hero h1 { font-size: 36px; }
    .ex-hero-sub { font-size: 15px; }

    .ex-filters-wrap { padding: 28px 18px 0; }
    .ex-filters-row { flex-direction: column; align-items: flex-start; gap: 12px; }

    .ex-grid-wrap { padding: 20px 18px 80px; }
    .ex-grid { grid-template-columns: 1fr; gap: 18px; }

    .ex-play-circle { width: 50px; height: 50px; }
    .ex-play-circle svg { width: 18px; height: 18px; }
}

@media (max-width: 480px) {
    .ex-nav-sep, .ex-nav-title { display: none; }
    .ex-toolbar-right { flex-wrap: wrap; gap: 8px; }
}
