/* ═══════════════════════════════════════════
   ligma verson t9589
   ═══════════════════════════════════════════ */

:root {
    --bg: #F5F6F7;
    --bg-dark: #E8E9EB;
    --primary: #2F2F33;
    --primary-light: #4A4A50;
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --text: #2F2F33;
    --text-muted: #71717a;
    --text-light: #a1a1aa;
    --white: #ffffff;
    --glass-bg: rgba(255,255,255,0.65);
    --glass-border: rgba(255,255,255,0.5);
    --glass-shadow: 0 8px 32px rgba(0,0,0,0.06);
    --glass-blur: 20px;
    --radius: 18px;
    --radius-sm: 12px;
    --radius-xs: 8px;
    --header-h: 60px;
    --nav-h: 44px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ══════════════════════════════════════════
   SMOOTH SCROLL - Lenis Integration
   ══════════════════════════════════════════ */
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-scrolling iframe { pointer-events: none; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { border: none; background: none; cursor: pointer; font-family: inherit; }
img { max-width: 100%; display: block; }
input, textarea { font-family: inherit; font-size: inherit; }

/* ─── Glass Effects ─── */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow);
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
    overflow: hidden;
}
.glass-card:hover {
    transform: translateY(-3px) scale(1.008);
    box-shadow: 0 16px 48px rgba(0,0,0,0.12);
}

.glass-flat {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
}

/* ─── Header ─── */
.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(245,246,247,0.8);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    height: var(--header-h);
    will-change: transform;
    transform: translateZ(0);
}
.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 16px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.logo-text { font-size: 18px; font-weight: 700; color: var(--primary); letter-spacing: -0.3px; }

.search-wrapper { flex: 1; max-width: 560px; margin: 0 auto; position: relative; }
.search-box {
    display: flex; align-items: center;
    background: var(--white);
    border: 1.5px solid rgba(0,0,0,0.08);
    border-radius: 50px;
    overflow: hidden;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.search-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99,102,241,0.12); }
.search-input { flex: 1; border: none; outline: none; padding: 10px 16px; font-size: 14px; background: transparent; color: var(--text); }
.search-input::placeholder { color: var(--text-light); }
.search-btn { padding: 8px 14px; color: var(--text-muted); transition: color var(--transition); display: flex; align-items: center; }
.search-btn:hover { color: var(--primary); }

.search-suggestions {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0;
    background: var(--white); border-radius: var(--radius-sm);
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    border: 1px solid rgba(0,0,0,0.06);
    display: none; overflow: hidden; z-index: 100;
}
.search-suggestions.active { display: block; }
.suggest-item {
    padding: 10px 16px; cursor: pointer; font-size: 14px;
    transition: background var(--transition);
    display: flex; align-items: center; gap: 10px;
}
.suggest-item:hover { background: var(--bg); }
.suggest-item svg { flex-shrink: 0; color: var(--text-light); }

.header-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.icon-btn {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; color: var(--text);
    transition: background var(--transition);
}
.icon-btn:hover { background: rgba(0,0,0,0.06); }

.mobile-search {
    display: none; padding: 8px 16px 12px;
    background: rgba(245,246,247,0.95); backdrop-filter: blur(24px); position: relative;
}
.mobile-search.active { display: block; }

.mobile-menu-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.3); z-index: 1100;
    opacity: 0; transition: opacity var(--transition);
}
.mobile-menu-overlay.active { display: block; opacity: 1; }
.mobile-menu {
    position: fixed; top: 0; right: -280px; width: 280px; height: 100%;
    background: var(--white); z-index: 1200;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto; box-shadow: -4px 0 24px rgba(0,0,0,0.1);
}
.mobile-menu.active { right: 0; }
.mobile-menu-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid rgba(0,0,0,0.06);
}
.mobile-menu-item {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 20px; font-size: 15px; font-weight: 500;
    color: var(--text-muted); transition: all var(--transition);
}
.mobile-menu-item:hover, .mobile-menu-item.active { color: var(--primary); background: var(--bg); }

/* Desktop Nav */
.desktop-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0; z-index: 999;
    background: rgba(245,246,247,0.9);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0,0,0,0.04);
    height: var(--nav-h);
    will-change: transform; transform: translateZ(0);
}
.nav-inner {
    max-width: 1400px; margin: 0 auto; padding: 0 16px;
    height: 100%; display: flex; align-items: center; gap: 4px;
}
.nav-item {
    padding: 6px 16px; font-size: 13px; font-weight: 500;
    color: var(--text-muted); border-radius: 50px; transition: all var(--transition);
}
.nav-item:hover { color: var(--text); background: rgba(0,0,0,0.04); }
.nav-item.active { color: var(--white); background: var(--primary); }

/* ─── Main Content ─── */
.main-content {
    max-width: 1400px; margin: 0 auto;
    padding: calc(var(--header-h) + var(--nav-h) + 20px) 16px 60px;
    min-height: calc(100vh - 120px);
}
.page-header { margin-bottom: 24px; }
.page-title { font-size: 22px; font-weight: 700; color: var(--primary); letter-spacing: -0.3px; }

/* ─── Filter Tabs ─── */
.filter-tabs {
    display: flex; gap: 6px; margin-bottom: 24px;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; padding-bottom: 4px;
}
.filter-tabs::-webkit-scrollbar { display: none; }
.filter-tab {
    padding: 8px 18px; font-size: 13px; font-weight: 500;
    white-space: nowrap; border-radius: 50px;
    color: var(--text-muted); background: var(--white);
    border: 1px solid rgba(0,0,0,0.08); transition: all var(--transition); cursor: pointer;
}
.filter-tab:hover { color: var(--text); border-color: rgba(0,0,0,0.15); }
.filter-tab.active { color: var(--white); background: var(--primary); border-color: var(--primary); }

/* ─── Video Grid ─── */
.video-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* ══════════════════════════════════════════
   VIDEO CARD - Shimmer + Smooth Animations
   ══════════════════════════════════════════ */
.video-card {
    overflow: hidden;
    cursor: pointer;
    position: relative;
    will-change: transform, opacity;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.thumb-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #e8e9eb;
    overflow: hidden;
    border-radius: var(--radius) var(--radius) 0 0;
}

/* ── YouTube-style Shimmer on Thumbnail ── */
.thumb-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(
        90deg,
        rgba(232,233,235,0) 0%,
        rgba(232,233,235,0.4) 20%,
        rgba(255,255,255,0.7) 50%,
        rgba(232,233,235,0.4) 80%,
        rgba(232,233,235,0) 100%
    );
    background-size: 200% 100%;
    animation: yt-shimmer 1.6s ease-in-out infinite;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.4s ease;
}
.thumb-wrapper.loaded::before {
    opacity: 0;
    animation: none;
}

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

.thumb-wrapper img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: contain;
    background: #000;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                opacity 0.5s ease;
    opacity: 0;
    will-change: transform, opacity;
}
.thumb-wrapper img.loaded { opacity: 1; }
.video-card:hover .thumb-wrapper img.loaded { transform: scale(1.05); }

/* Play Overlay */
.play-overlay {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.15);
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 3;
}
.video-card:hover .play-overlay { opacity: 1; }
.play-btn-circle {
    width: 52px; height: 52px;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(8px); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform: scale(0.85);
}
.video-card:hover .play-btn-circle { transform: scale(1); }
.play-btn-circle svg { margin-left: 3px; }

/* Card Info */
.card-info { padding: 12px 14px; }
.card-title {
    font-size: 14px; font-weight: 600; color: var(--text);
    line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; margin-bottom: 6px;
    position: relative; min-height: 20px;
}

/* YouTube shimmer on title */
.card-title.shimmer {
    color: transparent !important;
    background: #e8e9eb;
    border-radius: 6px;
    overflow: hidden;
    user-select: none;
}
.card-title.shimmer::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(90deg,
        rgba(232,233,235,0) 0%,
        rgba(255,255,255,0.7) 50%,
        rgba(232,233,235,0) 100%
    );
    background-size: 200% 100%;
    animation: yt-shimmer 1.6s ease-in-out infinite;
}

.card-meta {
    display: flex; align-items: center; gap: 8px;
    font-size: 12px; color: var(--text-muted);
    position: relative; min-height: 16px;
}
.card-meta.shimmer {
    color: transparent !important;
    background: #e8e9eb;
    border-radius: 4px;
    width: 55%;
    overflow: hidden;
}
.card-meta.shimmer::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(90deg,
        rgba(232,233,235,0) 0%,
        rgba(255,255,255,0.7) 50%,
        rgba(232,233,235,0) 100%
    );
    background-size: 200% 100%;
    animation: yt-shimmer 1.6s ease-in-out infinite;
}
.card-meta.shimmer span,
.card-meta.shimmer .card-meta-dot { opacity: 0; }
.card-meta-dot { width: 3px; height: 3px; background: var(--text-light); border-radius: 50%; }

/* Size badge */
.size-badge {
    position: absolute; bottom: 8px; right: 8px;
    background: rgba(0,0,0,0.75); color: #fff;
    font-size: 11px; font-weight: 500;
    padding: 2px 7px; border-radius: 4px;
    backdrop-filter: blur(4px); z-index: 4;
}

/* ─── Skeleton Loading (legacy) ─── */
.skeleton {
    background: linear-gradient(90deg, #e5e7eb 25%, #f0f1f3 37%, #e5e7eb 63%);
    background-size: 400% 100%;
    animation: skeleton-pulse 1.4s ease infinite;
    border-radius: var(--radius-xs);
}
@keyframes skeleton-pulse {
    0% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.skeleton-card .thumb-wrapper { background: none; }
.skeleton-card .thumb-wrapper::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(90deg, #e5e7eb 25%, #f0f1f3 37%, #e5e7eb 63%);
    background-size: 400% 100%;
    animation: skeleton-pulse 1.4s ease infinite;
}
.skeleton-title { height: 16px; width: 85%; margin-bottom: 8px; }
.skeleton-meta { height: 12px; width: 55%; }

/* ─── Video Page ─── */
.video-page { max-width: 1200px; margin: 0 auto; }
.video-main { margin-bottom: 32px; }
.video-player-wrapper {
    position: relative; width: 100%; padding-top: 56.25%;
    background: #000; border-radius: var(--radius); overflow: hidden; cursor: pointer;
}
.video-player-wrapper img {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: contain;
}
.big-play-btn {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.25);
    transition: background var(--transition);
}
.big-play-btn:hover { background: rgba(0,0,0,0.35); }
.big-play-circle {
    width: 76px; height: 76px;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 24px rgba(0,0,0,0.2);
    transition: transform 0.2s ease;
}
.big-play-btn:hover .big-play-circle { transform: scale(1.08); }
.big-play-circle svg { margin-left: 4px; }

.video-info { margin-top: 20px; }
.video-title {
    font-size: 20px; font-weight: 700; color: var(--primary);
    line-height: 1.4; margin-bottom: 12px;
}
.video-stats {
    display: flex; align-items: center; gap: 16px;
    color: var(--text-muted); font-size: 14px; margin-bottom: 16px;
}

.video-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.action-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 16px; font-size: 13px; font-weight: 500;
    border-radius: 50px; border: 1px solid rgba(0,0,0,0.1);
    background: var(--white); color: var(--text); transition: all var(--transition);
}
.action-btn:hover { background: var(--primary); color: var(--white); border-color: var(--primary); }

.video-keywords { display: flex; gap: 6px; flex-wrap: wrap; }
.keyword-tag {
    padding: 5px 12px; font-size: 12px; font-weight: 500;
    background: rgba(99,102,241,0.08); color: var(--accent);
    border-radius: 50px; transition: background var(--transition);
}
.keyword-tag:hover { background: rgba(99,102,241,0.15); }

.recs-section { margin-top: 40px; }
.recs-title { font-size: 18px; font-weight: 700; margin-bottom: 20px; color: var(--primary); }

/* ─── Modal ─── */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.4); backdrop-filter: blur(4px);
    z-index: 2000; display: none;
    align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal { width: 100%; max-width: 440px; padding: 0; overflow: hidden; }
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 20px; border-bottom: 1px solid rgba(0,0,0,0.06);
}
.modal-header h3 { font-size: 16px; font-weight: 600; }
.modal-body { padding: 20px; }
.modal-footer {
    padding: 16px 20px; display: flex; justify-content: flex-end;
    gap: 8px; border-top: 1px solid rgba(0,0,0,0.06);
}

.report-options { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.report-option {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; border-radius: var(--radius-sm);
    cursor: pointer; transition: background var(--transition); font-size: 14px;
}
.report-option:hover { background: var(--bg); }
.report-option input[type="radio"] { accent-color: var(--accent); }
.report-textarea {
    width: 100%; min-height: 80px; padding: 12px;
    border: 1.5px solid rgba(0,0,0,0.1); border-radius: var(--radius-sm);
    resize: vertical; outline: none; font-size: 14px;
    transition: border-color var(--transition);
}
.report-textarea:focus { border-color: var(--accent); }
.report-charcount { text-align: right; font-size: 12px; color: var(--text-light); margin-top: 4px; }

/* ─── Buttons ─── */
.btn {
    padding: 9px 20px; font-size: 14px; font-weight: 500;
    border-radius: 50px; transition: all var(--transition);
    display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-light); }
.btn-secondary { background: var(--bg); color: var(--text); }
.btn-secondary:hover { background: var(--bg-dark); }

/* ─── Toast ─── */
.toast {
    position: fixed; bottom: -60px; left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px; background: var(--primary); color: var(--white);
    border-radius: 50px; font-size: 14px; font-weight: 500;
    z-index: 3000; transition: bottom 0.3s ease;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}
.toast.active { bottom: 30px; }
.toast.error { background: #dc2626; }
.toast.success { background: #16a34a; }

/* ─── Footer ─── */
.footer {
    padding: 24px 16px; text-align: center;
    font-size: 13px; color: var(--text-light);
    border-top: 1px solid rgba(0,0,0,0.04);
}
.footer-inner { max-width: 1400px; margin: 0 auto; }
.footer-links { margin-top: 6px; }
.footer-links a { color: var(--text-muted); margin: 0 8px; }
.footer-links a:hover { color: var(--accent); }

/* ─── Loading Spinner ─── */
.loading-spinner { display: flex; justify-content: center; padding: 40px; }
.spinner {
    width: 32px; height: 32px;
    border: 3px solid rgba(0,0,0,0.08);
    border-top-color: var(--primary);
    border-radius: 50%; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Empty State ─── */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state svg { margin: 0 auto 16px; opacity: 0.3; }
.empty-state h3 { font-size: 18px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.empty-state p { font-size: 14px; }

/* ─── Search Results ─── */
.search-result-header { font-size: 14px; color: var(--text-muted); margin-bottom: 20px; }
.search-result-header strong { color: var(--text); }

/* ─── Responsive ─── */
.mobile-only { display: none; }
.desktop-only { display: block; }

@media (max-width: 1024px) {
    .video-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}
@media (max-width: 768px) {
    .video-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .desktop-only { display: none; }
    .mobile-only { display: flex; }
    .desktop-nav { display: none; }
    .main-content { padding-top: calc(var(--header-h) + 16px); }
    .header-inner { padding: 0 12px; }
    .card-info { padding: 10px 12px; }
    .card-title { font-size: 13px; }
    .video-title { font-size: 17px; }
}
@media (max-width: 480px) {
    .video-grid { grid-template-columns: 1fr; gap: 14px; }
    .video-actions { gap: 6px; }
    .action-btn { padding: 7px 12px; font-size: 12px; }
}

/* ══════════════════════════════════════════
   SCROLL-REVEAL ANIMATIONS
   ══════════════════════════════════════════ */
.video-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.video-card.revealed {
    opacity: 1;
    transform: translateY(0);
}
.video-card.revealed:nth-child(4n+1) { transition-delay: 0s; }
.video-card.revealed:nth-child(4n+2) { transition-delay: 0.05s; }
.video-card.revealed:nth-child(4n+3) { transition-delay: 0.10s; }
.video-card.revealed:nth-child(4n+4) { transition-delay: 0.15s; }

/* ─── Reduced Motion ─── */
@media (prefers-reduced-motion: reduce) {
    .video-card { opacity: 1; transform: none; transition: none; }
    .thumb-wrapper::before { animation: none; opacity: 0; }
    .card-title.shimmer::after,
    .card-meta.shimmer::after { animation: none; }
    html { scroll-behavior: auto; }
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.25); }