/* ============================================================
   Pimple.TV — Main Stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&family=Lato:wght@300;400;700&display=swap');

/* ---- CSS Custom Properties ---- */
:root {
    --bg-primary: #f0f2f5;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-input: #f5f5f5;
    --bg-hover: #e4e6e9;
    --text-primary: #1a1a1a;
    --text-secondary: #606770;
    --text-muted: #8e8e8e;
    --border-color: #dddfe2;
    --accent: #04abf2;
    --accent-hover: #0390cc;
    --accent-light: rgba(4, 171, 242, 0.1);
    --danger: #e74c3c;
    --success: #2ecc71;
    --warning: #f39c12;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --radius-sm: 4px;
    --radius-lg: 12px;
    --font-primary: 'Roboto', sans-serif;
    --font-secondary: 'Lato', sans-serif;
    --navbar-height: 60px;
    --transition: all 0.2s ease;
}

[data-theme="dark"] {
    --bg-primary: #0f0f0f;
    --bg-secondary: #1a1a1a;
    --bg-card: #212121;
    --bg-input: #2a2a2a;
    --bg-hover: #333333;
    --text-primary: #e0e0e0;
    --text-secondary: #aaaaaa;
    --text-muted: #717171;
    --border-color: #333333;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ---- Base Reset ---- */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    margin: 0;
    padding: 0;
    padding-top: var(--navbar-height);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
    height: auto;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar-pimple {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    height: var(--navbar-height);
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    padding: 0 16px;
}

.navbar-brand img {
    height: 32px;
}

.navbar-search {
    flex: 1;
    max-width: 600px;
    margin: 0 24px;
    position: relative;
}

.navbar-search input {
    width: 100%;
    height: 40px;
    padding: 0 40px 0 16px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background-color: var(--bg-input);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.navbar-search input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-light);
}

.navbar-search button {
    position: absolute;
    right: 4px;
    top: 4px;
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.navbar-nav-items {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.nav-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: var(--transition);
}

.nav-icon-btn:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

.nav-icon-btn .badge {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-user-menu {
    position: relative;
}

.nav-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}

.nav-user-avatar:hover {
    border-color: var(--accent);
}

/* ---- Theme Toggle ---- */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-toggle-switch {
    width: 44px;
    height: 24px;
    background: var(--text-muted);
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: var(--transition);
}

.theme-toggle-switch::after {
    content: '';
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: var(--transition);
}

[data-theme="dark"] .theme-toggle-switch {
    background: var(--accent);
}

[data-theme="dark"] .theme-toggle-switch::after {
    left: 22px;
}

/* ============================================================
   VIDEO CARD
   ============================================================ */
/* ============================================================
   VIDEO SLIDER — carousel on desktop, grid on mobile
   ============================================================ */
.video-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.video-track {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: hidden;
    overflow-y: visible;
    gap: 16px;
    scroll-behavior: smooth;
    width: 100%;
}

.video-col {
    flex: 0 0 calc(20% - 13px) !important;
    max-width: calc(20% - 13px);
    min-width: 0;
    box-sizing: border-box;
}

/* Slider arrows — desktop only */
.slider-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    bottom: 60px;
    width: 40px;
    z-index: 2;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
    padding: 0;
}

.slider-arrow svg {
    width: 28px;
    height: 28px;
    fill: #fff;
}

.slider-prev {
    left: 0;
    border-radius: 0 var(--radius) var(--radius) 0;
}

.slider-next {
    right: 0;
    border-radius: var(--radius) 0 0 var(--radius);
}

.video-slider:hover .slider-arrow {
    opacity: 1;
}

.slider-arrow:hover {
    background: rgba(0, 0, 0, 0.85);
}

/* Responsive: 4 per row at smaller desktop */
@media (max-width: 1360px) {
    .video-col {
        flex: 0 0 calc(25% - 12px) !important;
        max-width: calc(25% - 12px);
    }
}

@media (max-width: 991px) {
    .video-col {
        flex: 0 0 calc(33.333% - 11px) !important;
        max-width: calc(33.333% - 11px);
    }
}

/* Mobile: destroy slider, use grid */
@media (max-width: 530px) {
    .video-slider {
        overflow: visible;
    }

    .video-track {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
        overflow: visible;
        flex-wrap: wrap;
    }

    .video-col {
        flex: none !important;
        max-width: 100%;
        min-width: 0;
    }

    .slider-arrow {
        display: none !important;
    }
}

.video-card {
    margin-bottom: 20px;
}

.video-card a {
    color: var(--text-primary);
}

.video-card a:hover {
    color: var(--accent);
}

.video-thumb {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    border-radius: var(--radius);
    overflow: hidden;
    background-color: var(--bg-input);
}

.video-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-card:hover .video-thumb img {
    transform: scale(1.05);
}

.video-thumb .duration {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}

.video-thumb .play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.video-card:hover .play-overlay {
    opacity: 1;
}

.play-overlay svg {
    width: 48px;
    height: 48px;
    fill: #fff;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.video-info {
    padding: 8px 0;
}

.video-info .video-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0 0 4px;
}

.video-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.video-meta .dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--text-muted);
}

.video-meta .channel-name {
    color: var(--text-secondary);
}

.video-meta .channel-name:hover {
    color: var(--text-primary);
}

.video-rating-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 12px;
    font-weight: 500;
    color: var(--warning);
}

.video-rating-badge svg {
    width: 12px;
    height: 12px;
    fill: var(--warning);
}

/* ---- Featured Badge ---- */
.featured-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    letter-spacing: 0.5px;
}

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 8px;
}

.section-header h2 {
    font-family: var(--font-secondary);
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.section-header .see-all {
    font-size: 14px;
    font-weight: 500;
    color: var(--accent);
}

/* ============================================================
   WATCH PAGE
   ============================================================ */
.video-player-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 16px;
}

.video-player-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-details {
    padding: 16px 0;
}

.video-details h1 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.3;
}

.video-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 12px 0;
}

.video-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    border: none;
    background: var(--bg-hover);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.video-action-btn:hover {
    background: var(--accent-light);
    color: var(--accent);
}

.video-action-btn.active {
    background: var(--accent);
    color: #fff;
}

.video-action-btn svg {
    width: 18px;
    height: 18px;
}

/* ---- Channel Info (on watch page) ---- */
.channel-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

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

.channel-details {
    flex: 1;
}

.channel-details h3 {
    font-size: 16px;
    font-weight: 500;
    margin: 0;
}

.channel-details h3 a {
    color: var(--text-primary);
}

.channel-details .subscriber-count {
    font-size: 12px;
    color: var(--text-muted);
}

.subscribe-btn {
    padding: 8px 20px;
    border-radius: 20px;
    border: none;
    background: var(--accent);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.subscribe-btn:hover {
    background: var(--accent-hover);
}

.subscribe-btn.subscribed {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* ---- Description ---- */
.video-description {
    padding: 12px 16px;
    background: var(--bg-card);
    border-radius: var(--radius);
    margin: 12px 0;
    font-size: 14px;
    line-height: 1.6;
    cursor: pointer;
}

.video-description.collapsed {
    max-height: 80px;
    overflow: hidden;
    position: relative;
}

.video-description.collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(transparent, var(--bg-card));
}

/* ---- Sidebar Suggestions ---- */
.sidebar-video {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.sidebar-video .sidebar-thumb {
    width: 168px;
    min-width: 168px;
    height: 94px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
    background: var(--bg-input);
}

.sidebar-video .sidebar-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-video .sidebar-info {
    flex: 1;
    min-width: 0;
}

.sidebar-video .sidebar-info h4 {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    margin: 0 0 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar-video .sidebar-info h4 a {
    color: var(--text-primary);
}

/* ============================================================
   RATING WIDGET
   ============================================================ */
.rating-widget {
    display: flex;
    align-items: center;
    gap: 4px;
}

.rating-star {
    cursor: pointer;
    width: 24px;
    height: 24px;
    color: var(--text-muted);
    transition: color 0.15s ease;
}

.rating-star.filled,
.rating-star:hover,
.rating-widget:hover .rating-star {
    color: var(--warning);
}

.rating-widget:hover .rating-star:hover ~ .rating-star {
    color: var(--text-muted);
}

.rating-score {
    font-size: 14px;
    font-weight: 700;
    color: var(--warning);
    margin-left: 8px;
}

/* ============================================================
   COMMENTS
   ============================================================ */
.comment-section {
    margin-top: 24px;
}

.comment-form {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.comment-form .comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-form .comment-input-wrap {
    flex: 1;
}

.comment-form textarea {
    width: 100%;
    min-height: 40px;
    padding: 8px 12px;
    border: none;
    border-bottom: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-primary);
    font-size: 14px;
    resize: none;
    outline: none;
    transition: var(--transition);
}

.comment-form textarea:focus {
    border-bottom-color: var(--accent);
}

.comment-form .comment-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}

.comment-item {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.comment-item .comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.comment-body {
    flex: 1;
}

.comment-body .comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.comment-body .comment-author {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.comment-body .comment-time {
    font-size: 12px;
    color: var(--text-muted);
}

.comment-body .comment-text {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 8px;
}

.comment-body .comment-footer {
    display: flex;
    align-items: center;
    gap: 16px;
}

.comment-vote-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: none;
    background: none;
    color: var(--text-muted);
    font-size: 12px;
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.comment-vote-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

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

.comment-replies {
    margin-left: 52px;
    margin-top: 8px;
}

.pinned-badge {
    font-size: 11px;
    color: var(--accent);
    font-weight: 500;
}

/* ============================================================
   CATEGORIES BAR
   ============================================================ */
.categories-bar {
    display: flex;
    gap: 8px;
    padding: 12px 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.categories-bar::-webkit-scrollbar {
    display: none;
}

.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    transition: var(--transition);
    text-decoration: none;
}

.category-pill:hover,
.category-pill.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* ============================================================
   FEATURED SLIDER
   ============================================================ */
.featured-slider {
    position: relative;
    margin-bottom: 24px;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.featured-slide {
    position: relative;
    height: 360px;
    background-size: cover;
    background-position: center;
    display: none;
}

.featured-slide.active {
    display: block;
}

.featured-slide::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70%;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
}

.featured-slide-content {
    position: absolute;
    bottom: 24px;
    left: 24px;
    right: 24px;
    color: #fff;
}

.featured-slide-content h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px;
}

.featured-slide-content p {
    font-size: 14px;
    opacity: 0.8;
    margin: 0;
}

.slider-controls {
    position: absolute;
    bottom: 16px;
    right: 24px;
    display: flex;
    gap: 8px;
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: var(--transition);
}

.slider-dot.active {
    background: #fff;
    width: 24px;
    border-radius: 4px;
}

/* ============================================================
   BUTTONS & FORMS
   ============================================================ */
.btn-accent {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-accent:hover {
    background: var(--accent-hover);
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 8px 20px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.form-control-pimple {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.form-control-pimple:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-light);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer-pimple {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 32px 0;
    margin-top: 48px;
}

.footer-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 13px;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-copyright {
    font-size: 12px;
    color: var(--text-muted);
}

/* ============================================================
   PAYWALL MODAL
   ============================================================ */
.paywall-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.paywall-modal {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 40px;
    max-width: 480px;
    width: 90%;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.paywall-modal h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 12px;
}

.paywall-modal p {
    color: var(--text-secondary);
    font-size: 15px;
    margin: 0 0 24px;
}

.paywall-price {
    font-size: 36px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 8px;
}

.paywall-price span {
    font-size: 16px;
    color: var(--text-muted);
    font-weight: 400;
}

.paywall-features {
    text-align: left;
    margin: 24px 0;
    list-style: none;
    padding: 0;
}

.paywall-features li {
    padding: 6px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.paywall-features li::before {
    content: '\2713';
    color: var(--success);
    font-weight: 700;
    margin-right: 10px;
}

.paywall-dismiss {
    display: block;
    margin-top: 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 13px;
}

.paywall-dismiss:hover {
    color: var(--text-secondary);
}

/* ---- Blurred Player (paywall active) ---- */
.player-blurred {
    filter: blur(10px);
    pointer-events: none;
    user-select: none;
}

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth-container {
    max-width: 420px;
    margin: 40px auto;
    padding: 32px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.auth-container h1 {
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 24px;
}

.auth-container .form-group {
    margin-bottom: 16px;
}

.auth-container label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

/* ============================================================
   USER PROFILE
   ============================================================ */
.profile-header {
    position: relative;
    margin-bottom: 24px;
}

.profile-cover {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    background: var(--bg-input);
}

.profile-avatar-wrap {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    margin-top: -40px;
    padding: 0 24px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--bg-primary);
}

.profile-info h1 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.profile-info .profile-stats {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

/* ============================================================
   NOTIFICATION DROPDOWN
   ============================================================ */
.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 360px;
    max-height: 480px;
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 1060;
    display: none;
}

.notification-dropdown.show {
    display: block;
}

.notification-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.notification-item:hover {
    background: var(--bg-hover);
}

.notification-item.unread {
    background: var(--accent-light);
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination-wrap {
    display: flex;
    justify-content: center;
    padding: 24px 0;
}

/* ============================================================
   TOAST / FLASH MESSAGES
   ============================================================ */
.toast-container {
    position: fixed;
    top: 80px;
    right: 16px;
    z-index: 3000;
}

.toast-msg {
    padding: 12px 20px;
    border-radius: var(--radius);
    color: #fff;
    font-size: 14px;
    margin-bottom: 8px;
    animation: slideIn 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.toast-msg.success { background: var(--success); }
.toast-msg.error   { background: var(--danger); }
.toast-msg.info    { background: var(--accent); }
.toast-msg.warning { background: var(--warning); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

/* ============================================================
   SEARCH RESULTS
   ============================================================ */
.search-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.filter-select {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
}

/* ============================================================
   ADMIN PANEL (basic overrides)
   ============================================================ */
.admin-sidebar {
    width: 240px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    min-height: calc(100vh - var(--navbar-height));
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    padding-top: 16px;
    overflow-y: auto;
}

.admin-sidebar a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: var(--text-secondary);
    font-size: 14px;
    transition: var(--transition);
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
    background: var(--accent-light);
    color: var(--accent);
}

.admin-content {
    margin-left: 240px;
    padding: 24px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.stat-card h3 {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0 0 8px;
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .navbar-search {
        max-width: none;
        margin: 0 8px;
    }

    .featured-slide {
        height: 240px;
    }

    .featured-slide-content h2 {
        font-size: 18px;
    }

    .video-player-container {
        border-radius: 0;
        margin: 0 -12px;
    }

    .sidebar-video .sidebar-thumb {
        width: 120px;
        min-width: 120px;
        height: 68px;
    }

    .admin-sidebar {
        display: none;
    }

    .admin-content {
        margin-left: 0;
    }

    .paywall-modal {
        padding: 24px;
    }

    .section-header h2 {
        font-size: 16px;
    }

    .video-card {
        margin-bottom: 12px;
    }

    .video-info .video-title {
        font-size: 13px;
    }

    .video-meta {
        font-size: 11px;
    }

    .play-overlay svg {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 576px) {
    :root {
        --navbar-height: 56px;
    }

    .navbar-brand img {
        height: 24px;
    }

    .video-details h1 {
        font-size: 16px;
    }

    .video-col {
        flex: 0 0 44%;
        min-width: 140px;
    }

    .video-info .video-title {
        font-size: 12px;
        -webkit-line-clamp: 2;
    }

    .video-meta {
        font-size: 10px;
    }

    .video-thumb .duration {
        font-size: 10px;
        padding: 1px 4px;
    }
}

/* ============================================================
   LAZY LOADING
   ============================================================ */
img[data-src] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[data-src].loaded {
    opacity: 1;
}

/* ---- Loading spinner ---- */
.spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

.load-more-wrap {
    text-align: center;
    padding: 16px;
}
