/* JAV Italia - Dark Theme Styles */

:root {
    --bg-primary: #0f0f0f;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #242424;
    --text-primary: #f1f1f1;
    --text-secondary: #aaaaaa;
    --accent-primary: #ff4458;
    --accent-hover: #ff6677;
    --border-color: #333;
    --card-bg: #1f1f1f;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: #ff4458 #0a0a0a;
}

html {
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #ff4458, #ff6b9d) !important;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ff5568, #ff7dac) !important;
}

::-webkit-scrollbar-thumb:active {
    background: linear-gradient(180deg, #ff4458, #ff6b9d) !important;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 15px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: top 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.site-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #ff4458 30%, #ff6b9d 60%, transparent 100%);
}

.site-header.header-hidden {
    top: -80px;
}

.site-header.header-scrolled {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

body {
    padding-top: 70px;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.logo {
    flex-shrink: 0;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 32px;
    width: auto;
}

.search-box {
    flex: 1;
    max-width: 600px;
    position: relative;
}

.search-box form {
    display: flex;
    gap: 10px;
    width: 100%;
}

.search-box input {
    flex: 1;
    padding: 10px 15px;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 4px;
    min-width: 0;
    outline: none;
}
.search-box input:focus,
.search-box input:focus-visible {
    outline: none;
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.5);
}

.search-box button {
    padding: 10px 20px;
    background: linear-gradient(135deg, #ff4458, #ff6b9d);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: box-shadow 0.3s, filter 0.3s;
    flex-shrink: 0;
}

.search-box button:hover {
    filter: brightness(1.1);
    box-shadow: 0 4px 15px rgba(255, 68, 88, 0.4);
}

.main-nav {
    flex-shrink: 0;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
}

.main-nav a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    white-space: nowrap;
}

.main-nav a:hover {
    color: var(--accent-primary);
}

.main-nav .admin-link {
    color: var(--accent-primary);
    background-color: rgba(255, 68, 88, 0.12);
    padding: 6px 14px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s;
}

.main-nav .admin-link i {
    margin-right: 4px;
}

.main-nav .admin-link:hover {
    background-color: var(--accent-primary);
    color: #fff;
}

/* Nav Dropdown (Altro) */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-dropdown-arrow {
    font-size: 10px;
    transition: transform 0.2s;
}

.nav-dropdown.open .nav-dropdown-arrow {
    transform: rotate(180deg);
}

.main-nav .nav-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 8px 0;
    min-width: 200px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
    z-index: 1200;
    list-style: none;
}

.main-nav .nav-dropdown.open .nav-dropdown-menu {
    display: block;
}

.nav-dropdown-menu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.15s;
    white-space: nowrap;
}

.nav-dropdown-menu li a:hover {
    background: rgba(255,255,255,0.05);
    color: var(--accent-primary);
}

.nav-dropdown-menu li a i {
    width: 18px;
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}

.nav-dropdown-menu li a:hover i {
    color: var(--accent-primary);
}

.nav-dropdown-menu .admin-link {
    background: none;
    padding: 10px 18px;
    border-radius: 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--accent-primary);
}

.nav-dropdown-menu .admin-link:hover {
    background: rgba(255, 68, 88, 0.1);
    color: var(--accent-primary);
}

.nav-dropdown-menu .admin-link i {
    color: var(--accent-primary);
}

.nav-dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 6px 0;
}

.nav-logout-link {
    color: var(--text-secondary) !important;
}

.nav-logout-link:hover {
    color: var(--accent-primary) !important;
}

/* Mobile header elements - hidden on desktop */
.mobile-menu-toggle,
.mobile-search-toggle,
.mobile-search-close,
.mobile-nav-close,
.header-mobile-actions {
    display: none;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
    padding-top: 20px;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 40px 0;
    margin-bottom: 30px;
}

.hero-section h1 {
    font-size: 36px;
    margin-bottom: 10px;
}

.hero-section p {
    color: var(--text-secondary);
    font-size: 18px;
}

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

.video-card {
    position: relative;
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.video-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 8px 24px rgba(255, 68, 88, 0.15);
}

.video-link {
    text-decoration: none;
    color: inherit;
}

.video-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 800 / 538;
    overflow: hidden;
    background-color: var(--bg-tertiary);
    display: block;
}

.video-thumbnail img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transition: transform 0.3s;
}

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

.duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
}

.video-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, transparent 35%, transparent 55%, rgba(0,0,0,0.6) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

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

.play-icon {
    font-size: 48px;
    color: white;
}

.video-info {
    padding: 15px;
}

.video-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s;
}

.video-meta {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: var(--text-secondary);
}

.rating {
    color: #ffd700;
}

/* Video Detail Page */
.video-detail-page {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    max-width: 1400px;
    margin: 0 auto;
}

.video-player {
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.video-player video {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
}

.video-header h1 {
    font-size: 22px;
    margin-bottom: 15px;
    line-height: 1.3;
    padding-top: 14px;
}

.video-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    color: var(--text-secondary);
    flex-wrap: wrap;
    font-size: 14px;
}

.video-stats .views i,
.video-stats .rating i,
.video-stats .upload-date i {
    margin-right: 4px;
}

.video-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.video-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.video-description,
.video-categories,
.video-tags {
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.category-tag,
.tag {
    display: inline-block;
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    margin: 5px;
    font-size: 14px;
    transition: background-color 0.3s;
}

.category-tag:hover,
.tag:hover {
    background-color: var(--accent-primary);
}

/* ===== Favorite Button ===== */
.btn-favorite-active {
    background-color: rgba(255, 68, 88, 0.15);
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
}

.btn-favorite-active:hover {
    background-color: rgba(255, 68, 88, 0.25);
}

.btn-favorite-active .fa-heart {
    color: var(--accent-primary);
}

#favorite-icon {
    transition: transform 0.3s ease, color 0.3s ease;
}

@keyframes favoritePulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.4); }
    100% { transform: scale(1); }
}

.favorite-pulse {
    animation: favoritePulse 0.4s ease-in-out;
}

/* ===== Comments Section ===== */
.comments-section {
    background-color: var(--card-bg);
    padding: 24px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.comments-section > h3 {
    margin-bottom: 20px;
    font-size: 20px;
}

.comments-section > h3 i {
    color: var(--accent-primary);
    margin-right: 8px;
}

/* Comment form */
.comment-form-header {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.comment-form-header textarea {
    flex: 1;
    padding: 12px 14px;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 8px;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.3s;
}

.comment-form-header textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.comment-form-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    padding-left: 52px;
    flex-wrap: wrap;
}

.comment-form-footer .spoiler-hint {
    margin-right: auto;
}

.comment-form-actions {
    display: flex;
    gap: 8px;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.char-count {
    color: var(--text-secondary);
    font-size: 13px;
}

.comment-error {
    color: var(--accent-primary);
    margin-top: 10px;
    padding-left: 52px;
    display: none;
    font-size: 14px;
}

.comment-login-prompt {
    color: var(--text-secondary);
    padding: 20px;
    text-align: center;
}

.comment-login-prompt a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
}

/* Avatar */
.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), #cc2233);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.comment-avatar-sm {
    width: 32px;
    height: 32px;
    font-size: 13px;
}

/* Comment layout */
.comment {
    display: flex;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.comment:last-child {
    border-bottom: none;
}

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

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.comment-username {
    color: var(--text-primary);
    font-size: 14px;
}

.comment-date {
    color: var(--text-secondary);
    font-size: 12px;
}

.comment-date i {
    margin-right: 3px;
}

.comment-content {
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.comment-actions {
    margin-top: 8px;
}

.reply-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.reply-btn:hover {
    color: var(--accent-primary);
    background-color: rgba(255, 68, 88, 0.1);
}

.reply-btn i {
    margin-right: 4px;
}

/* Replies */
.replies-list {
    margin-top: 12px;
    padding-left: 20px;
    border-left: 2px solid var(--border-color);
}

.comment-reply {
    padding: 10px 0;
}

/* No comments */
.no-comments {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.no-comments i {
    font-size: 48px;
    opacity: 0.3;
    display: block;
    margin-bottom: 12px;
}

/* New comment animation */
.comment-new {
    opacity: 0;
    transform: translateY(-10px);
}

.comment-animate-in {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Spoiler tag */
.spoiler {
    background-color: var(--text-primary);
    color: transparent;
    border-radius: 3px;
    padding: 1px 4px;
    cursor: pointer;
    transition: all 0.3s;
    user-select: none;
}

.spoiler.revealed {
    background-color: rgba(255, 68, 88, 0.15);
    color: var(--text-primary);
}

/* Spoiler hint */
.spoiler-hint {
    font-size: 12px;
    color: var(--text-secondary);
    opacity: 0.7;
}

.spoiler-hint i {
    margin-right: 4px;
}

/* Delete button */
.delete-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.delete-btn:hover {
    color: var(--accent-primary);
    background-color: rgba(255, 68, 88, 0.1);
}

.delete-btn i {
    margin-right: 4px;
}

/* ===== Video Sidebar (Related Videos) ===== */
.video-sidebar {
    align-self: start;
}

.sidebar-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.sidebar-title i {
    color: var(--accent-primary);
    margin-right: 8px;
}

.sidebar-videos {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-card {
    display: flex;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s;
    padding: 8px;
}

.sidebar-card:hover {
    background-color: var(--bg-tertiary);
    border-color: rgba(255, 68, 88, 0.3);
}

.sidebar-card-thumb {
    position: relative;
    width: 140px;
    min-width: 140px;
    aspect-ratio: 800 / 538;
    border-radius: 6px;
    overflow: hidden;
    background-color: var(--bg-tertiary);
}

.sidebar-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.sidebar-duration {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background-color: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
}

.sidebar-card-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.sidebar-card-info h4 {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

.sidebar-card-meta {
    display: flex;
    gap: 10px;
    font-size: 11px;
    color: var(--text-secondary);
}

.sidebar-card-meta i {
    margin-right: 3px;
}

.sidebar-rating {
    color: #ffd700;
}

.sidebar-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.sidebar-tag {
    display: inline-block;
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 10px;
}

.sidebar-card:hover .sidebar-tag {
    background-color: rgba(255, 68, 88, 0.15);
    color: var(--text-primary);
}

/* Video detail responsive */
@media (max-width: 1024px) {
    .video-detail-page {
        grid-template-columns: 1fr;
    }


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

@media (max-width: 768px) {
    .video-header h1 {
        font-size: 18px;
    }

    .comment-form-footer {
        padding-left: 0;
    }

    .comment-form-header {
        flex-direction: column;
    }

    .comment-form-header textarea {
        width: 100%;
    }

    .comment-form-header .comment-avatar {
        display: none;
    }

    .sidebar-videos {
        grid-template-columns: repeat(2, 1fr);
    }

    .sidebar-card {
        flex-direction: column;
        gap: 0;
        padding: 0;
        overflow: hidden;
    }

    .sidebar-card-thumb {
        width: 100%;
        min-width: 0;
        aspect-ratio: 800 / 538;
        border-radius: 0;
    }

    .sidebar-card-info {
        padding: 8px;
    }
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #ff4458, #ff6b9d);
    color: white;
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #ff5568, #ff7dac);
    box-shadow: 0 4px 15px rgba(255, 68, 88, 0.4);
}

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

.btn-secondary:hover {
    background-color: var(--border-color);
}

.btn-lg {
    padding: 15px 40px;
    font-size: 18px;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

/* Old pagination removed - see New Pagination section below */

/* Age Verification */
.age-gate {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
}

.age-verification-container {
    width: 100%;
    max-width: 500px;
    padding: 20px;
}

.age-verification-box {
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.warning-icon {
    font-size: 60px;
    margin: 20px 0;
}

.age-verification-box h1 {
    font-size: 28px;
    margin-bottom: 10px;
}

.age-verification-box h2 {
    color: var(--accent-primary);
    margin-bottom: 20px;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 30px 0;
}

.disclaimer {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 20px;
}

.disclaimer a {
    color: var(--accent-primary);
    text-decoration: none;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.error-message {
    background-color: rgba(255, 68, 88, 0.2);
    border: 1px solid var(--accent-primary);
    color: var(--text-primary);
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* ===== Auth Pages (Login / Register) ===== */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-primary);
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(255, 68, 88, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(255, 68, 88, 0.04) 0%, transparent 50%);
    padding: 20px;
}

.auth-wrapper {
    width: 100%;
    max-width: 420px;
}

.auth-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px 36px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
    text-decoration: none;
    display: inline-block;
}

.auth-logo-img {
    height: 36px;
    width: auto;
}

.auth-logo:hover {
    opacity: 0.9;
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 8px;
}

.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 14px;
    line-height: 1.5;
}

.auth-alert i {
    margin-top: 2px;
    flex-shrink: 0;
}

.auth-alert ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.auth-alert ul li + li {
    margin-top: 4px;
}

.auth-alert-error {
    background-color: rgba(255, 68, 88, 0.1);
    border: 1px solid rgba(255, 68, 88, 0.3);
    color: #ff8a95;
}

.auth-alert-error i {
    color: var(--accent-primary);
}

.auth-alert-success {
    background-color: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86efac;
}

.auth-alert-success i {
    color: #22c55e;
}

.auth-remember {
    justify-content: space-between;
}

.auth-forgot {
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.auth-forgot:hover {
    color: var(--accent-primary);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-input-icon {
    position: relative;
}

.auth-input-icon i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 14px;
    transition: color 0.3s;
    pointer-events: none;
}

.auth-input-icon input {
    width: 100%;
    padding: 14px 16px 14px 42px;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 10px;
    font-size: 15px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.auth-input-icon input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(255, 68, 88, 0.15);
}

.auth-input-icon:focus-within i:first-child {
    color: var(--accent-primary);
}

.auth-eye-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    font-size: 15px;
    line-height: 1;
    z-index: 1;
}

.auth-eye-toggle i {
    position: static;
    transform: none;
    pointer-events: none;
    color: inherit;
    font-size: inherit;
}

.auth-eye-toggle:hover {
    color: var(--text-primary);
}

.auth-input-icon:has(.auth-eye-toggle) input {
    padding-right: 42px;
}

.auth-hint {
    font-size: 12px;
    color: var(--text-secondary);
    padding-left: 4px;
}

.auth-remember {
    display: flex;
    align-items: center;
}

.auth-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    user-select: none;
}

.auth-checkbox input {
    display: none;
}

.auth-checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.auth-checkbox input:checked ~ .auth-checkmark {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.auth-checkbox input:checked ~ .auth-checkmark::after {
    content: '';
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-top: -1px;
}

.auth-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--accent-primary) 0%, #e63950 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 6px;
}

.auth-btn:hover {
    background: linear-gradient(135deg, #e63950 0%, var(--accent-primary) 100%);
    box-shadow: 0 4px 20px rgba(255, 68, 88, 0.35);
    transform: translateY(-1px);
}

.auth-btn:active {
    transform: translateY(0);
}

.auth-footer {
    text-align: center;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.auth-footer p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.auth-footer a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.auth-back {
    font-size: 13px;
    color: var(--text-secondary) !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.auth-back:hover {
    color: var(--text-primary) !important;
    text-decoration: none !important;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.auth-divider span {
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-google-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    opacity: 1;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: border-color 0.25s, box-shadow 0.25s, transform 0.2s;
}
.auth-google-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(66,133,244,0.12), rgba(234,67,53,0.08));
    opacity: 0;
    transition: opacity 0.25s;
}
.auth-google-btn:hover {
    border-color: rgba(255,255,255,0.18);
    box-shadow: 0 4px 16px rgba(0,0,0,0.35);
    color: var(--text-primary);
    text-decoration: none;
    transform: translateY(-2px);
}
.auth-google-btn:hover::before {
    opacity: 1;
}

.auth-google-hint {
    text-align: center;
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 6px;
}

@media (max-width: 480px) {
    .auth-card {
        padding: 30px 24px;
        border-radius: 12px;
    }

    .auth-logo-img {
        height: 28px;
    }
}

/* ===== Profile Page ===== */
.profile-page {
}

.profile-card {
    background-color: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 40px;
    margin-bottom: 14px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 36px;
}

.profile-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), #e0394d);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 20px rgba(255, 68, 88, 0.3);
}

.profile-avatar span {
    font-size: 36px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    line-height: 1;
}

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

.profile-username {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px 0;
    word-break: break-word;
}

.profile-member-since,
.profile-last-login {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-member-since i,
.profile-last-login i {
    color: var(--accent-primary);
    font-size: 13px;
    width: 16px;
    text-align: center;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.profile-stat {
    background: var(--bg-primary);
    border-radius: 10px;
    padding: 12px 10px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: border-color 0.2s, transform 0.2s;
    text-decoration: none !important;
    display: block;
}

a.profile-stat:hover,
.profile-stat.profile-stat-link:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.profile-stat-icon {
    font-size: 16px;
    color: var(--accent-primary);
    margin-bottom: 6px;
}

.profile-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 4px;
}

.profile-stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.profile-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

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

.profile-info-card {
    background: var(--bg-secondary);
    border-radius: 14px;
    border: 1px solid var(--border-color);
    padding: 24px 28px;
}

.profile-info-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.profile-info-card-header i {
    color: var(--accent-primary);
    font-size: 14px;
}

.profile-info-row {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.profile-info-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.profile-info-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-info-value {
    font-size: 15px;
    color: var(--text-primary);
    font-weight: 500;
    word-break: break-word;
}

.profile-info-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.profile-info-badge-google {
    background: rgba(66,133,244,0.12);
    color: #4285f4;
    border: 1px solid rgba(66,133,244,0.25);
}

.profile-info-badge-user {
    background: rgba(255,68,88,0.1);
    color: var(--accent-primary);
    border: 1px solid rgba(255,68,88,0.2);
}

.profile-info-badge-admin {
    background: rgba(255,170,0,0.12);
    color: #ffaa00;
    border: 1px solid rgba(255,170,0,0.25);
}

.profile-info-badge-premium {
    background: rgba(255,210,0,0.12);
    color: #ffd200;
    border: 1px solid rgba(255,210,0,0.3);
}

.profile-info-favorites-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    background: rgba(255,68,88,0.08);
    border: 1px solid rgba(255,68,88,0.2);
    border-radius: 10px;
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
    text-decoration: none;
    width: 100%;
}

.profile-info-favorites-link:hover {
    background: rgba(255,68,88,0.15);
    border-color: var(--accent-primary);
    transform: translateY(-1px);
}

.profile-section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 24px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-section-title i {
    color: var(--accent-primary);
}

.profile-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.profile-detail-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.profile-detail-label {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-detail-label i {
    color: var(--accent-primary);
    width: 14px;
    text-align: center;
    font-size: 12px;
}

.profile-detail-value {
    font-size: 15px;
    color: var(--text-primary);
    font-weight: 500;
    word-break: break-word;
}

@media (max-width: 600px) {
    .profile-card {
        padding: 24px 20px;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .profile-member-since,
    .profile-last-login {
        justify-content: center;
    }

    .profile-username {
        font-size: 22px;
    }

    .profile-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .profile-tabs {
        flex-wrap: wrap;
        gap: 6px;
        padding: 6px;
    }

    .profile-tab {
        flex: 1 1 calc(33.333% - 6px);
        min-width: calc(33.333% - 6px);
        font-size: 12px;
        padding: 9px 6px;
        gap: 4px;
    }

    .profile-tab i { font-size: 13px; }

    .profile-details {
        grid-template-columns: 1fr;
    }

    .profile-info-flat-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .profile-details-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Settings Page ===== */
.settings-page {
    padding-bottom: 40px;
}

.settings-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    align-items: start;
}

.settings-sidebar {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 28px 20px;
    position: sticky;
    top: 100px;
    text-align: center;
}

.settings-sidebar-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), #e0394d);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    box-shadow: 0 4px 16px rgba(255, 68, 88, 0.25);
}

.settings-sidebar-avatar span {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
}

.settings-sidebar-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    word-break: break-word;
}

.settings-sidebar-email {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    word-break: break-word;
}

.settings-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}

.settings-sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.15s;
}

.settings-sidebar-link:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
    text-decoration: none;
}

.settings-sidebar-link.active {
    background: rgba(255, 68, 88, 0.1);
    color: var(--accent-primary);
}

.settings-sidebar-link i {
    width: 18px;
    text-align: center;
    font-size: 14px;
}

.settings-sidebar-danger {
    color: #ff6b7a;
}

.settings-sidebar-danger:hover {
    background: rgba(255, 68, 88, 0.08);
    color: #ff6b7a;
}

.settings-sidebar-danger.active {
    background: rgba(255, 68, 88, 0.15);
    color: #ff6b7a;
}

.settings-content {
    min-width: 0;
}

.settings-alert {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.settings-alert-error {
    background: rgba(255, 68, 88, 0.1);
    border: 1px solid rgba(255, 68, 88, 0.25);
    color: #ff6b7a;
}

.settings-alert ul {
    margin: 0;
    padding-left: 16px;
    list-style: disc;
}

.settings-alert i {
    margin-top: 2px;
}

.settings-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 28px 32px;
    margin-bottom: 20px;
}

.settings-section-danger {
    border-color: rgba(255, 68, 88, 0.3);
}

.settings-section-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-section-title i {
    color: var(--accent-primary);
    font-size: 16px;
}

.settings-danger-title i {
    color: #ff6b7a;
}

.settings-danger-alert {
    background: rgba(255, 68, 88, 0.08);
    border: 1px solid rgba(255, 68, 88, 0.2);
    border-radius: 10px;
    padding: 16px 18px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #ff6b7a;
}

.settings-danger-alert i {
    font-size: 18px;
    margin-top: 2px;
    flex-shrink: 0;
}

.settings-danger-alert p {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.settings-google-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #4285f4;
    background: rgba(66, 133, 244, 0.1);
    border: 1px solid rgba(66, 133, 244, 0.25);
    border-radius: 20px;
    padding: 4px 10px;
    margin-bottom: 14px;
}

.settings-info-alert {
    background: rgba(66, 133, 244, 0.08);
    border: 1px solid rgba(66, 133, 244, 0.2);
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    font-size: 13px;
    color: #7db3f8;
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.settings-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.settings-field label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.settings-field input[type="text"],
.settings-field input[type="email"],
.settings-field input[type="password"] {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text-primary);
    font-size: 14px;
    transition: border-color 0.2s;
}

.settings-field input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.settings-hint {
    font-size: 12px;
    color: var(--text-secondary);
}

.settings-checkbox-field {
    margin-top: 4px;
}

.settings-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
    user-select: none;
}

.settings-checkbox input[type="checkbox"] {
    display: none;
}

.settings-checkmark {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 2px solid var(--border-color);
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.settings-checkbox input[type="checkbox"]:checked + .settings-checkmark {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.settings-checkbox input[type="checkbox"]:checked + .settings-checkmark::after {
    content: '\2713';
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.settings-btn {
    align-self: flex-start;
    background: linear-gradient(135deg, var(--accent-primary), #e0394d);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.settings-btn:hover {
    opacity: 0.9;
}

.settings-btn-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
}

.settings-btn-danger:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

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

    .settings-sidebar {
        position: static;
    }

    .settings-section {
        padding: 20px 18px;
    }
}

/* Legal Pages */
.legal-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 0 40px;
}

.legal-section-card {
    background: var(--bg-secondary);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 28px 32px;
    margin-bottom: 14px;
}

.legal-section-card h2 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.legal-section-card h2 i {
    color: var(--accent-primary);
    font-size: 16px;
    flex-shrink: 0;
}

.legal-section-card p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 10px;
    font-size: 14px;
}

.legal-section-card p:last-child { margin-bottom: 0; }

.legal-section-card ul,
.legal-section-card ol {
    margin: 10px 0;
    padding-left: 22px;
}

.legal-section-card li {
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.7;
    font-size: 14px;
}

.legal-section-card strong { color: var(--text-primary); }

.legal-section-card a {
    color: var(--accent-primary);
    text-decoration: none;
}

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

.legal-contact-card {
    background: var(--bg-secondary);
    border: 1px solid rgba(255,68,88,0.2);
    border-radius: 12px;
    padding: 28px 32px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.legal-contact-card i {
    font-size: 32px;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.legal-contact-card h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.legal-contact-card a {
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 15px;
}

.legal-contact-card small {
    display: block;
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 4px;
}

.legal-warning-card {
    background: rgba(255,68,88,0.07);
    border: 1px solid rgba(255,68,88,0.25);
    border-radius: 12px;
    padding: 22px 28px;
    margin-bottom: 14px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.legal-warning-card i {
    color: var(--accent-primary);
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.legal-warning-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 14px;
    margin: 0;
}

.legal-page strong {
    color: var(--text-primary);
    font-weight: 600;
}

.contact-box {
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--accent-primary);
    margin: 20px 0;
}

.contact-box p {
    margin-bottom: 10px;
}

.contact-box .note {
    font-size: 14px;
    color: var(--text-secondary);
    font-style: italic;
}

.warning-box {
    background-color: rgba(255, 68, 88, 0.1);
    border: 2px solid var(--accent-primary);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.warning-box p {
    margin-bottom: 10px;
}

.warning-box strong {
    color: var(--accent-primary);
}

/* Footer */
.site-footer {
    background: rgba(8, 8, 8, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 50px 0 0;
    margin-top: 80px;
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #ff4458 30%, #ff6b9d 70%, transparent 100%);
}

/* Footer layout */
.footer-main {
    display: grid;
    grid-template-columns: 1.6fr 2fr;
    gap: 60px;
    padding-bottom: 40px;
}

/* Brand col */
.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-logo {
    height: 30px;
    width: auto;
    display: block;
}

.footer-tagline {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.65;
    max-width: 320px;
}

.footer-socials {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.footer-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 20px;
    background: rgba(255, 68, 88, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    transition: transform 0.2s ease, color 0.2s ease, background 0.2s ease;
    text-decoration: none;
}

.footer-social-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 68, 88, 0.15);
    color: #fff;
}

.footer-social-tg,
.footer-social-email {
    background: rgba(255, 68, 88, 0.08);
    color: rgba(255, 255, 255, 0.7);
}

.footer-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.footer-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(255, 68, 88, 0.08);
    border: 1px solid rgba(255, 68, 88, 0.2);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
}

.footer-badge i {
    color: #ff4458;
    font-size: 11px;
}

/* Links col */
.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.footer-col h5 {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 16px;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s, transform 0.2s;
}

.footer-col a i {
    width: 14px;
    text-align: center;
    font-size: 12px;
    color: rgba(255, 68, 88, 0.5);
    transition: color 0.2s;
}

.footer-col a:hover {
    color: #fff;
    transform: translateX(4px);
}

.footer-col a:hover i {
    color: #ff4458;
}

/* Disclaimer box */
.footer-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 20px;
    padding: 12px 14px;
    background: rgba(255, 68, 88, 0.07);
    border: 1px solid rgba(255, 68, 88, 0.15);
    border-radius: 8px;
}

.footer-disclaimer > i {
    color: #ff4458;
    font-size: 14px;
    margin-top: 2px;
    flex-shrink: 0;
}

.footer-disclaimer strong {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.footer-disclaimer p {
    font-size: 11px;
    color: var(--text-secondary);
    margin: 0;
}

/* Footer bottom bar */
.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.3);
    font-size: 13px;
    margin: 0;
}

.footer-age-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    background: linear-gradient(135deg, rgba(255,68,88,0.2), rgba(255,107,157,0.1));
    border: 1px solid rgba(255, 68, 88, 0.3);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: #ff4458;
}

.footer-warning {
    background: linear-gradient(135deg, #8B0000 0%, #B22222 100%);
    color: #FFD700;
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 800;
    font-size: 14px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.3);
    letter-spacing: 1px;
}

/* No Results */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    background-color: var(--card-bg);
    border-radius: 12px;
}

.no-results h2 {
    font-size: 28px;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.no-results p {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 10px;
}

.no-results ul {
    list-style: none;
    padding: 0;
    margin-top: 20px;
}

.no-results ul li {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.no-results ul li:before {
    content: "•";
    color: var(--accent-primary);
    font-weight: bold;
    margin-right: 10px;
}

/* Search Page */
.search-header {
    text-align: center;
    padding: 20px 0;
    margin-bottom: 30px;
}

.search-header h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.results-count {
    color: var(--text-secondary);
    font-size: 16px;
}

.search-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.search-filters {
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: 8px;
    height: fit-content;
    position: sticky;
    top: 90px;
}

.search-filters h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--text-primary);
    border-bottom: 2px solid var(--accent-primary);
    padding-bottom: 10px;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 14px;
}

.filter-input,
.filter-select {
    width: 100%;
    padding: 10px 12px;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.filter-select option {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-block {
    width: 100%;
    margin-bottom: 10px;
}

.search-results-main {
    min-width: 0;
}

/* Responsive */
@media (max-width: 1024px) {
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
    }
}

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

    .search-filters {
        position: static;
        margin-bottom: 30px;
    }

    .footer-main {
        grid-template-columns: 1fr;
        gap: 30px;
    }

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

/* --- Mobile Header (hamburger + search toggle) --- */
@media (max-width: 1170px) {
    .site-header {
        padding: 10px 0;
    }

    .header-content {
        display: flex;
        align-items: center;
        gap: 0;
        position: relative;
    }

    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 10px;
        flex-shrink: 0;
        order: 1;
    }

    .hamburger-line {
        display: block;
        width: 22px;
        height: 2px;
        background-color: var(--text-primary);
        border-radius: 2px;
        transition: transform 0.3s, opacity 0.3s;
    }

    .mobile-menu-toggle.active .hamburger-line:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .mobile-menu-toggle.active .hamburger-line:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active .hamburger-line:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .logo {
        order: 2;
        flex: 1;
        min-width: 0;
        text-align: center;
        overflow: hidden;
        transition: opacity 0.3s;
    }

    .logo-img {
        height: 24px;
    }

    .logo.hidden {
        opacity: 0;
        pointer-events: none;
    }

    .header-mobile-actions {
        display: flex;
        align-items: center;
        flex-shrink: 0;
        order: 3;
    }

    .mobile-search-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        color: var(--text-primary);
        font-size: 18px;
        cursor: pointer;
        padding: 10px;
        transition: color 0.3s;
    }

    .mobile-search-toggle.active {
        color: var(--accent-primary);
    }

    /* Search box - hidden by default, expands over header */
    .search-box {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        display: flex;
        align-items: center;
        max-width: 100%;
        opacity: 0;
        visibility: hidden;
        z-index: 20;
        transition: opacity 0.25s;
        padding: 0 8px;
        background-color: var(--bg-secondary);
        order: 4;
    }

    .search-box form {
        flex: 1;
    }

    .search-box.mobile-active {
        opacity: 1;
        visibility: visible;
    }

    .mobile-search-close {
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        color: var(--text-primary);
        font-size: 18px;
        cursor: pointer;
        padding: 8px;
        flex-shrink: 0;
        margin-right: 4px;
    }

    /* Nav - slide-in panel from left */
    .main-nav {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 270px;
        background-color: var(--bg-secondary);
        border-right: 1px solid var(--border-color);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        order: 5;
        z-index: 1100;
        overflow-y: auto;
        padding-top: 60px;
    }

    .main-nav.open {
        transform: translateX(0);
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 0;
    }

    .main-nav li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .main-nav li:last-child {
        border-bottom: none;
    }

    .main-nav a {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 16px 24px;
        font-size: 15px;
    }

    .main-nav a i {
        width: 20px;
        text-align: center;
        font-size: 16px;
        color: var(--text-secondary);
    }

    .main-nav a:hover,
    .main-nav a:active {
        background-color: var(--bg-tertiary);
        color: var(--accent-primary);
    }

    .main-nav a:hover i,
    .main-nav a:active i {
        color: var(--accent-primary);
    }

    .main-nav .admin-link {
        border-radius: 0;
        background-color: transparent;
        padding: 16px 24px;
        font-size: 15px;
        color: var(--accent-primary);
        border-left: 3px solid var(--accent-primary);
    }

    .main-nav .admin-link i {
        color: var(--accent-primary);
    }

    .main-nav .admin-link:hover {
        background-color: rgba(255, 68, 88, 0.1);
    }

    /* Dropdown in mobile: flatten completely */
    .nav-dropdown {
        display: contents;
    }

    .nav-dropdown-toggle {
        display: none !important;
    }

    .nav-dropdown-arrow {
        display: none;
    }

    .nav-dropdown-menu {
        display: contents !important;
    }

    .nav-dropdown-menu li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .nav-dropdown-menu li a {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 16px 24px;
        font-size: 15px;
        color: var(--text-primary);
        text-decoration: none;
    }

    .nav-dropdown-menu li a i {
        width: 20px;
        text-align: center;
        font-size: 16px;
        color: var(--text-secondary);
    }

    .nav-dropdown-menu li a:hover,
    .nav-dropdown-menu li a:active {
        background-color: var(--bg-tertiary);
        color: var(--accent-primary);
    }

    .nav-dropdown-menu li a:hover i,
    .nav-dropdown-menu li a:active i {
        color: var(--accent-primary);
    }

    .nav-dropdown-menu .admin-link {
        padding: 16px 24px;
        font-size: 15px;
        border-left: 3px solid var(--accent-primary);
        border-radius: 0;
        background: transparent;
        color: var(--accent-primary);
    }

    .nav-dropdown-menu .admin-link i {
        color: var(--accent-primary);
    }

    .nav-dropdown-divider {
        height: 1px;
        background: rgba(255, 255, 255, 0.06);
        border-bottom: none;
    }

    /* Close button inside nav panel */
    .mobile-nav-close {
        position: absolute;
        top: 12px;
        right: 12px;
        background: none;
        border: none;
        color: var(--text-secondary);
        font-size: 22px;
        cursor: pointer;
        padding: 8px;
        line-height: 1;
        transition: color 0.2s;
    }

    .mobile-nav-close:hover {
        color: var(--text-primary);
    }

    /* Nav overlay */
    .mobile-nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.6);
        z-index: 1099;
    }

    .mobile-nav-overlay.active {
        display: block;
    }
}

@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .hero-section h1 {
        font-size: 28px;
    }

    .video-header h1 {
        font-size: 20px;
    }

    .footer-main {
        grid-template-columns: 1fr;
        gap: 20px;
    }

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

    .footer-bottom {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

/* User Pages */
.page-header {
    text-align: center;
    padding: 30px 0;
    margin-bottom: 40px;
    border-bottom: 2px solid var(--border-color);
}

.page-header h1 {
    font-size: 36px;
    margin-bottom: 10px;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 20px;
}

/* Playlists Grid */
.playlists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.playlist-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.playlist-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 68, 88, 0.3);
}

.playlist-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.playlist-thumbnail {
    position: relative;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f0f0f 100%);
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.playlist-icon {
    font-size: 64px;
    opacity: 0.15;
}

.playlist-count {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.playlist-info {
    padding: 16px;
}

.playlist-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-info p {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.playlist-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.playlist-visibility-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.playlist-visibility-badge.badge-public {
    background: rgba(40, 167, 69, 0.15);
    color: #5cb85c;
}

.playlist-visibility-badge.badge-private {
    background: rgba(255, 193, 7, 0.15);
    color: #e0a800;
}

.playlist-date {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.playlist-meta {
    font-size: 13px;
    color: var(--text-secondary);
}

.delete-playlist-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    opacity: 0;
    transition: opacity 0.2s;
}

.playlist-card:hover .delete-playlist-btn {
    opacity: 1;
}

/* Playlist Detail Header */
.playlist-detail-header {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.playlist-detail-top {
    margin-bottom: 16px;
}

.playlist-back-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}

.playlist-back-link:hover {
    color: var(--accent-primary);
}

.playlist-detail-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

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

.playlist-detail-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.playlist-detail-title i {
    color: var(--accent-primary);
    font-size: 20px;
}

.playlist-detail-desc {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 12px;
}

.playlist-detail-stats {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.playlist-stat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--text-secondary);
}

.playlist-stat i {
    font-size: 12px;
    opacity: 0.7;
}

/* Playlist Action Buttons */
.playlist-detail-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.playlist-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.playlist-action-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

.playlist-action-btn i {
    font-size: 13px;
}

.playlist-action-visibility:hover {
    border-color: rgba(255, 193, 7, 0.4);
    color: #e0a800;
}

.playlist-action-share:hover {
    border-color: rgba(40, 167, 69, 0.4);
    color: #5cb85c;
}

.playlist-action-delete:hover {
    border-color: rgba(220, 53, 69, 0.4);
    color: #dc3545;
    background: rgba(220, 53, 69, 0.08);
}

@media (max-width: 768px) {
    .playlist-detail-main {
        flex-direction: column;
        gap: 16px;
    }

    .playlist-detail-actions {
        width: 100%;
    }

    .playlist-action-btn {
        flex: 1;
        justify-content: center;
        padding: 10px 12px;
    }

    .playlist-action-btn span {
        display: none;
    }

    .playlist-detail-title {
        font-size: 20px;
    }

    .playlists-grid {
        grid-template-columns: 1fr;
    }
}

/* Remove video button (on playlist detail video cards) */
.remove-video-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s;
}

.video-card:hover .remove-video-btn {
    opacity: 1;
}

/* Rating Box */
.rating-box {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.rating-box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.rating-box-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.rating-box-label i {
    color: #ffd700;
    margin-right: 6px;
}

.rating-box-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rating-box-feedback {
    font-size: 13px;
    color: var(--text-secondary);
    transition: color 0.3s;
}

.rating-remove-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.rating-remove-btn:hover {
    background: rgba(255, 68, 88, 0.15);
    color: var(--accent-primary);
}

.rating-box-scale {
    display: flex;
    gap: 6px;
}

.rating-btn {
    flex: 1;
    padding: 10px 0;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.rating-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(255, 68, 88, 0.08);
}

.rating-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
}

.rating-btn.highlight {
    border-color: rgba(255, 68, 88, 0.4);
    color: var(--accent-primary);
    background: rgba(255, 68, 88, 0.06);
}

@media (max-width: 600px) {
    .rating-box-scale {
        gap: 4px;
    }
    .rating-btn {
        padding: 8px 0;
        font-size: 12px;
        border-radius: 4px;
    }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: var(--bg-secondary);
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--accent-primary);
}

/* Confirm Dialog */
.confirm-overlay {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
}

.confirm-overlay.open {
    display: flex;
}

.confirm-box {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    animation: confirmIn 0.2s ease-out;
}

@keyframes confirmIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.confirm-icon {
    font-size: 40px;
    color: #ff4458;
    margin-bottom: 15px;
}

.confirm-message {
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 25px;
    line-height: 1.5;
}

.confirm-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.confirm-buttons .btn {
    min-width: 120px;
    padding: 10px 20px;
}

.modal-content h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--text-primary);
}

/* Playlist tabs */
.playlist-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--bg-tertiary);
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 10px 20px;
    cursor: pointer;
    font-size: 15px;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.tab-btn.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

.tab-btn:hover {
    color: var(--text-primary);
}

/* Playlist item */
.playlist-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: var(--bg-tertiary);
    border-radius: 8px;
    margin-bottom: 10px;
    transition: background-color 0.3s;
}

.playlist-item:hover {
    background-color: rgba(255, 68, 88, 0.1);
}

.playlist-item strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.playlist-item small {
    color: var(--text-secondary);
    font-size: 12px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* Form groups in modal */
.modal-content .form-group {
    margin-bottom: 20px;
}

.modal-content label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
}

.modal-content input[type="text"],
.modal-content textarea {
    width: 100%;
    padding: 10px;
    background-color: var(--bg-tertiary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
}

.modal-content label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 10px;
    margin-bottom: 0;
}

.modal-content input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 40px;
    min-width: 40px;
    height: 22px;
    background-color: var(--bg-tertiary);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 11px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
    margin: 0;
    padding: 0;
}

.modal-content input[type="checkbox"]::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background-color: var(--text-secondary);
    border-radius: 50%;
    transition: transform 0.2s, background-color 0.2s;
}

.modal-content input[type="checkbox"]:checked {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.modal-content input[type="checkbox"]:checked::after {
    transform: translateX(18px);
    background-color: #fff;
}

.modal-content textarea {
    resize: vertical;
    font-family: inherit;
}

/* Playlist header */
.playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
}

.playlist-meta {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 10px;
}

.playlist-meta span {
    display: inline-block;
}

/* Search page improvements */
.search-header-banner {
    background: linear-gradient(135deg, rgba(255, 68, 88, 0.15) 0%, rgba(139, 0, 0, 0.15) 100%);
    padding: 40px 0;
    margin: -20px 0 30px 0;
    border-radius: 12px;
}

.search-header-content {
    text-align: center;
}

.search-title {
    font-size: 36px;
    margin-bottom: 15px;
    font-weight: 700;
}

.search-icon {
    font-size: 40px;
    display: inline-block;
    margin-right: 10px;
    vertical-align: middle;
}

.search-query {
    color: var(--accent-primary);
    font-weight: 700;
}

.search-header-banner .results-count {
    font-size: 18px;
    color: var(--text-secondary);
}

.search-header-banner .results-count strong {
    color: var(--accent-primary);
    font-weight: 700;
}

/* Enhanced Video Cards */
.video-card {
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.video-card:hover {
    border-color: rgba(255, 68, 88, 0.45);
}

.video-card:hover .video-title {
    color: #ff6b9d;
    transition: color 0.3s;
}

.duration {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9) 0%, rgba(139, 0, 0, 0.9) 100%);
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.video-meta .rating {
    font-weight: 700;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.play-icon {
    background-color: rgba(255, 68, 88, 0.9);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    padding-left: 5px;
    box-shadow: 0 4px 20px rgba(255, 68, 88, 0.5);
}

/* New Pagination */
.pagination-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin: 40px 0;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
    cursor: pointer;
}

.page-btn:hover:not(.disabled):not(.page-current) {
    background-color: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    transform: translateY(-1px);
}

.page-btn.page-current {
    background-color: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    cursor: default;
}

.page-btn.disabled {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}

.page-btn.page-first,
.page-btn.page-last {
    font-size: 16px;
    font-weight: 700;
}

.page-btn.page-prev,
.page-btn.page-next {
    font-size: 18px;
    font-weight: 700;
}

.page-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    color: var(--text-secondary);
    font-weight: 700;
    letter-spacing: 2px;
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 13px;
}

/* Video Card Meta */
.video-meta-views {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-secondary);
}

.video-meta-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #ffd700;
}

/* Portrait card responsive breakpoints */
@media (max-width: 1024px) {
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
    }
}

@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

/* ── Search Filters Bar ── */
.search-filters-bar {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 14px;
}

.sfb-top {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.sfb-search {
    position: relative;
    flex: 1;
    min-width: 180px;
}

.sfb-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 13px;
    pointer-events: none;
}

.sfb-input {
    width: 100%;
    padding: 8px 12px 8px 34px;
    background: var(--input-bg, var(--bg-tertiary));
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
}

.sfb-input:focus {
    border-color: var(--accent-primary);
    outline: none;
}

.sfb-sort-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.sort-pill {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.sort-pill:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.sort-pill.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
}

.sfb-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.sfb-select {
    padding: 7px 28px 7px 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    appearance: auto;
    flex: 1;
    min-width: 110px;
    max-width: 180px;
}

.sfb-select:focus {
    border-color: var(--accent-primary);
    outline: none;
}

.sfb-submit {
    flex-shrink: 0;
    width: 38px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sfb-actions {
    flex-shrink: 0;
}

.search-results-container {
    width: 100%;
}

@media (max-width: 600px) {
    .sfb-sort-pills {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 2px;
    }
    .sfb-select {
        max-width: none;
    }
}

/* Categories Page */
.page-header-banner {
    background-color: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 14px;
    padding: 40px 0;
    text-align: center;
}

.page-header-content {
    max-width: 600px;
    margin: 0 auto;
}

.page-title {
    font-size: 36px;
    margin-bottom: 10px;
    font-weight: 700;
}

.page-icon {
    font-size: 40px;
    margin-right: 10px;
    vertical-align: middle;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 18px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.category-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--card-bg);
    padding: 20px 25px;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 68, 88, 0.2);
    border-color: rgba(255, 68, 88, 0.3);
}

.category-icon {
    font-size: 36px;
    flex-shrink: 0;
}

.category-info {
    flex: 1;
}

.category-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.category-count {
    font-size: 14px;
    color: var(--text-secondary);
}

.category-arrow {
    font-size: 24px;
    color: var(--accent-primary);
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s;
}

.category-card:hover .category-arrow {
    opacity: 1;
    transform: translateX(0);
}

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

    .page-title {
        font-size: 28px;
    }
}

/* ===== Section Headers (usati fuori dalla homepage) ===== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 14px 18px;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.01em;
}

.section-title i {
    color: #ff4458;
    font-size: 16px;
}

/* ===== Section Box (homepage: stile video-description) ===== */
.section-box {
    background-color: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 10px;
}

.section-box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.section-box-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.section-box-title i {
    color: var(--accent-primary);
    font-size: 18px;
}

.section-box-body {
    /* nessun padding aggiuntivo, il .section-box lo gestisce */
}

/* ===== Continua a guardare ===== */
.continua-section {
    margin-bottom: 14px;
}

.continua-close-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
    line-height: 1;
}

.continua-close-btn:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.07);
}

.continua-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.continua-card {
    position: relative;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.continua-link {
    text-decoration: none;
    display: block;
}

.continua-thumb {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16/9;
    background: var(--bg-tertiary);
}

.continua-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.continua-card:hover .continua-thumb img {
    transform: scale(1.04);
}

.continua-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.35);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.continua-overlay i {
    font-size: 28px;
    color: #fff;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.continua-card:hover .continua-overlay {
    opacity: 1;
}

.continua-remaining {
    position: absolute;
    bottom: 24px;
    right: 6px;
    background: rgba(0,0,0,0.72);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

.continua-part-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(255,68,88,0.88);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: .3px;
}

.continua-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255,255,255,0.18);
}

.continua-progress-fill {
    height: 100%;
    background: var(--accent-primary);
    border-radius: 0 2px 2px 0;
}

.continua-title {
    margin: 6px 0 0;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    padding-right: 22px;
}

.continua-card:hover .continua-title {
    color: var(--text-primary);
}

.continua-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0,0,0,0.65);
    border: none;
    color: rgba(255,255,255,0.8);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease;
}

.continua-card:hover .continua-remove {
    opacity: 1;
}

.continua-remove:hover {
    background: var(--accent-primary);
    color: #fff;
}

/* ===== Trending Slider ===== */
.trending-section {
    margin-bottom: 14px;
}

.slider-arrows {
    display: flex;
    gap: 8px;
}

.slider-arrow {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.slider-arrow:hover {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.slider-arrow[data-tooltip] {
    position: relative;
}
.slider-arrow[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) scale(0.85);
    background: rgba(20,20,20,0.95);
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.08);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s, transform 0.15s;
    z-index: 10;
}
.slider-arrow[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

.trending-slider-wrapper {
    overflow: hidden;
    position: relative;
}

.trending-slider {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px;
}

.trending-slider::-webkit-scrollbar {
    display: none;
}

.trending-card {
    flex: 0 0 220px;
    scroll-snap-align: start;
    text-decoration: none;
    color: inherit;
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.3s;
}

.trending-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 8px 24px rgba(255, 68, 88, 0.15);
    border-color: rgba(255, 68, 88, 0.45);
}

.trending-thumbnail {
    position: relative;
    aspect-ratio: 800 / 538;
    overflow: hidden;
    background-color: var(--bg-tertiary);
}

.trending-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.trending-card:hover .trending-thumbnail img {
    transform: scale(1.05);
}

.trending-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.6) 0%, transparent 40%, transparent 60%, rgba(0,0,0,0.7) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.trending-card:hover .trending-overlay {
    opacity: 1;
}

.trending-rank {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--accent-primary);
    color: white;
    font-weight: 800;
    font-size: 13px;
    padding: 3px 9px;
    border-radius: 5px;
    letter-spacing: 0.02em;
    opacity: 1 !important;
    z-index: 2;
}

.trending-play {
    font-size: 40px;
    color: white;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}

.trending-info {
    padding: 12px;
}

.trending-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}

.trending-views {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ===== Latest Section ===== */
.latest-section {
    margin-bottom: 14px;
}

/* ===== SEO Content Section ===== */
.seo-content {
    margin-top: 50px;
    margin-bottom: 50px;
    border-top: 1px solid var(--border-color);
    padding-top: 50px;
}

.seo-content-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.seo-content-hero-img {
    width: 100%;
    max-width: 240px;
    margin-bottom: 10px;
}

.seo-content-hero-img img {
    width: 100%;
    height: auto;
    display: block;
}

.seo-content-text {
    max-width: 860px;
    margin: 0 auto;
    text-align: left;
}

.seo-content h1 {
    font-size: 36px;
    color: var(--text-primary);
    margin-bottom: 16px;
    line-height: 1.15;
    font-weight: 700;
}

.seo-content h2 {
    font-size: 28px;
    color: var(--text-primary);
    margin-top: 24px;
    margin-bottom: 10px;
    line-height: 1.2;
    font-weight: 600;
}

.seo-content p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 12px;
}

.seo-content strong {
    color: var(--text-primary);
    font-weight: 700;
}

.seo-content em {
    font-style: italic;
}

@media (max-width: 1170px) {
    .seo-content h1 {
        font-size: 30px;
    }

    .seo-content h2 {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .seo-content {
        margin-top: 30px;
        margin-bottom: 30px;
        padding-top: 30px;
    }

    .seo-content-hero-img {
        max-width: 280px;
    }

    .seo-content h1 {
        font-size: 24px;
    }

    .seo-content h2 {
        font-size: 20px;
    }

    .seo-content p {
        font-size: 14px;
    }
}

/* ===== New Categories Grid ===== */
.categories-filter {
    margin-bottom: 14px;
}

.category-search-input {
    width: 100%;
    max-width: 400px;
    padding: 12px 16px;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s;
}

.category-search-input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.categories-grid-new {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}

.cat-card {
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s;
}

.cat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 68, 88, 0.2);
    border-color: rgba(255, 68, 88, 0.4);
}

.cat-card-top {
    background: linear-gradient(135deg, var(--accent-primary) 0%, #cc2233 100%);
    padding: 20px 16px;
    text-align: center;
}

.cat-video-count {
    display: block;
    font-size: 28px;
    font-weight: 800;
    color: white;
    line-height: 1;
}

.cat-label {
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

.cat-card-bottom {
    padding: 14px 16px;
}

.cat-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.page-count {
    color: var(--accent-primary);
    font-size: 14px;
    font-weight: 600;
    margin-top: 8px;
}

/* ===== Embed Player ===== */
.embed-player {
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
}

.player-unavailable {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    aspect-ratio: 16 / 9;
    background: var(--bg-secondary);
    border-radius: 8px;
    color: var(--text-secondary);
}
.player-unavailable i {
    font-size: 40px;
    color: var(--accent-primary);
    opacity: 0.6;
}
.player-unavailable span {
    font-size: 16px;
    font-weight: 500;
}

.embed-player iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: 8px;
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 768px) {
    .category-search-input {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .trending-card {
        flex: 0 0 160px;
    }

    .section-title {
        font-size: 20px;
    }

    .categories-grid-new {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }

    .cat-video-count {
        font-size: 22px;
    }

    .pagination-controls {
        gap: 4px;
    }

    .page-btn {
        min-width: 34px;
        height: 34px;
        font-size: 13px;
        padding: 0 8px;
    }

    .search-title {
        font-size: 24px;
    }
}

/* ===== Actresses Grid ===== */
.actresses-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}

.actress-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px 12px;
    text-decoration: none;
    color: var(--text-primary);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--border-color);
}

.actress-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    border-color: var(--accent-primary);
}

.actress-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    border: 2px solid var(--border-color);
}

.actress-card:hover .actress-avatar {
    border-color: var(--accent-primary);
}

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

.actress-initial {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent-primary);
}

.actress-info {
    text-align: center;
}

.actress-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.3;
}

.actress-count {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ===== Video Metadata ===== */
.video-metadata {
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.video-meta-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-color);
}

.meta-label {
    flex-shrink: 0;
    color: var(--text-secondary);
    font-size: 13px;
    min-width: 100px;
}

.meta-label i {
    width: 16px;
    text-align: center;
    margin-right: 4px;
}

.meta-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.meta-tag {
    display: inline-block;
    padding: 3px 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-primary);
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s;
}

.meta-tag:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
}

.meta-value {
    color: var(--text-primary);
    font-size: 13px;
}

.meta-code {
    font-family: monospace;
    font-weight: 700;
    font-size: 14px;
    color: var(--accent-primary);
    letter-spacing: 0.5px;
}

.video-title-en {
    color: var(--text-secondary);
    font-size: 14px;
    margin: -6px 0 8px 0;
    font-style: italic;
}

/* ===== Entity Detail Header ===== */
.entity-header-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-primary);
    margin-bottom: 12px;
}

.page-label {
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

/* ===== Search Filters Wrap ===== */
.filter-row {
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .actresses-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .actress-avatar {
        width: 60px;
        height: 60px;
    }

    .actress-initial {
        font-size: 22px;
    }

    .video-metadata {
        grid-template-columns: 1fr;
    }

    .video-meta-row {
        flex-direction: column;
        gap: 4px;
        border-right: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .video-meta-row:last-child {
        border-bottom: none;
    }

    .video-meta-row:nth-last-child(2):nth-child(odd) {
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .meta-label {
        min-width: auto;
    }
}

/* ===== Card Code Badge ===== */
.card-code-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.82);
    color: var(--accent-primary);
    font-family: 'Courier New', monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 3px 7px;
    border-radius: 4px;
    border: 1px solid rgba(255, 68, 88, 0.45);
    pointer-events: none;
    z-index: 3;
    line-height: 1.2;
    text-transform: uppercase;
}

/* ===== Video Header Bar (stats + actions in one row) ===== */
.video-title-block {
    margin-bottom: 10px;
}

.video-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
}

.video-stats {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--text-secondary);
    font-size: 13px;
    flex-wrap: wrap;
    margin-bottom: 0;
}

.stat-code {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    font-size: 13px;
    color: var(--accent-primary);
    background: rgba(255, 68, 88, 0.1);
    border: 1px solid rgba(255, 68, 88, 0.3);
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.video-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 0;
}

.btn-icon-only {
    padding: 8px 10px;
    min-width: 0;
}

/* ===== Video Info Panel (cover poster + metadata) ===== */
.video-info-panel {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.video-cover-poster {
    flex: 0 0 300px;
    background-color: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.video-cover-poster img {
    width: 100%;
    aspect-ratio: 800 / 538;
    object-fit: cover;
    border-radius: 4px;
    display: block;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.video-cover-poster .cover-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-secondary);
    text-align: center;
}

.video-info-panel .video-metadata-wrapper {
    flex: 1;
    min-width: 0;
}

/* ===== Sidebar code badge ===== */
.sidebar-code {
    position: absolute;
    bottom: 4px;
    left: 4px;
    background: rgba(0, 0, 0, 0.85);
    color: var(--accent-primary);
    font-family: 'Courier New', monospace;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 3px;
    line-height: 1.2;
    pointer-events: none;
}

/* ===== Responsive for new video-detail styles ===== */
@media (max-width: 768px) {
    .video-header-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .video-info-panel {
        flex-direction: column;
        gap: 12px;
    }

    .video-cover-poster {
        flex: none;
        width: 100%;
        padding: 0;
        border: none;
        background: transparent;
        border-radius: 6px;
        overflow: hidden;
    }

    .video-cover-poster img {
        aspect-ratio: auto;
        height: 170px;
        width: 100%;
        object-fit: cover;
        border-radius: 6px;
        box-shadow: none;
    }

    .video-metadata-wrapper {
        width: 100%;
    }
}

/* ===================================================================
   VIDEO DETAIL — UNIFORM REDESIGN
   =================================================================== */

/* ── Sezioni uniformi: descrizione, categorie, rating ─────────────── */
.video-description,
.video-categories,
.rating-box {
    background-color: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 18px 20px;
    margin-bottom: 14px;
}

/* Heading uniforme per tutte le sezioni — stile Commenti */
.video-description h3,
.video-categories h4 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 14px;
    border: none;
    padding: 0;
    background: none;
    text-transform: none;
    letter-spacing: 0;
}

.video-description h3 i,
.video-categories h4 i {
    color: var(--accent-primary);
    margin-right: 8px;
    font-size: inherit;
    width: auto;
}

/* Testo descrizione uniforme */
.video-description p {
    font-size: 14px;
    line-height: 1.75;
    color: var(--text-secondary);
    margin: 0;
}

/* Category tag più compatti e coerenti */
.video-categories .category-tag {
    font-size: 13px;
    padding: 5px 12px;
    margin: 3px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.07);
}

/* ── Rating box — ridisegnato ──────────────────────────────────────── */
.rating-box-header {
    margin-bottom: 14px;
}

.rating-box-label {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: none;
    letter-spacing: 0;
    display: flex;
    align-items: center;
    gap: 0;
}

.rating-box-label i {
    color: var(--accent-primary);
    font-size: inherit;
    margin-right: 8px;
}

/* Rating scale: segmented control */
.rating-box-scale {
    display: flex;
    gap: 0;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

.rating-btn {
    flex: 1;
    padding: 9px 0;
    border: none;
    border-right: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    border-radius: 0;
    text-align: center;
}

.rating-btn:last-child {
    border-right: none;
}

.rating-btn:hover {
    background: rgba(255, 68, 88, 0.1);
    color: var(--accent-primary);
    border-color: var(--border-color);
}

.rating-btn.highlight {
    background: rgba(255, 68, 88, 0.08);
    color: var(--accent-primary);
}

.rating-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
}

/* ── Metadata redesign — wrapper + codice header + 2-col grid ─────── */

/* Outer box wrapping code header + grid */
.video-metadata-wrapper {
    background-color: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 14px;
}

/* Code header — full-width prominent row above the grid */
.video-meta-code-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 68, 88, 0.05);
}

.video-meta-code-header .meta-label {
    min-width: auto;
}

/* Grid: inherits background from wrapper, no own box */
.video-metadata {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    margin-bottom: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
}

.video-meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Col 1 items (odd): right border as column divider */
.video-meta-row:nth-child(odd) {
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

/* Last odd item alone on its row: no right border */
.video-meta-row:last-child:nth-child(odd) {
    border-right: none;
}

/* Last row: no bottom border.
   – last-child covers the final item (even or odd count)
   – nth-last-child(2):nth-child(odd) covers its left-col partner when the last row is full */
.video-meta-row:last-child,
.video-meta-row:nth-last-child(2):nth-child(odd) {
    border-bottom: none;
}

.meta-label {
    flex-shrink: 0;
    min-width: 88px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.meta-label i {
    color: var(--accent-primary);
    width: 14px;
    text-align: center;
    font-size: 11px;
    margin-right: 0;
}

.meta-value {
    font-size: 14px;
    color: var(--text-primary);
}

.meta-tag {
    font-size: 13px;
    padding: 4px 11px;
    border-radius: 4px;
    background: var(--bg-tertiary);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.18s;
}

.meta-tag:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
}

.meta-code {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    font-size: 15px;
    color: var(--accent-primary);
    letter-spacing: 1px;
}

/* ===== Cookie / Age Banner ===== */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 420px;
    background-color: var(--card-bg);
    border: 1px solid rgba(255, 68, 88, 0.4);
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    padding: 16px 18px;
    display: none;
}
.cookie-banner.visible {
    display: block;
}
.cookie-banner-inner {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.cookie-banner-inner p {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary);
    margin: 0;
}
.cookie-banner-inner p i {
    color: var(--accent-primary);
    margin-right: 5px;
}
.cookie-banner-inner p a {
    color: var(--accent-primary);
    text-decoration: underline;
}
.cookie-banner-inner .btn {
    align-self: flex-end;
}
@media (max-width: 480px) {
    .cookie-banner {
        left: 12px;
        right: 12px;
        bottom: 12px;
        max-width: none;
    }
}

/* ── Search dropdown ── */
.search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    z-index: 2000;
    overflow: hidden;
}
.sd-list {
    list-style: none;
    margin: 0;
    padding: 6px 0;
}
.sd-item a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 12px;
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.12s;
}
.sd-item a:hover { background: var(--bg-secondary); }
.sd-thumb {
    width: 52px;
    height: 35px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    background: var(--bg-tertiary);
}
.sd-thumb-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 14px;
}
.sd-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.sd-code {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-primary);
    letter-spacing: 0.5px;
}
.sd-title {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
}
.sd-more a {
    display: block;
    padding: 9px 14px;
    font-size: 13px;
    color: var(--accent-primary);
    text-decoration: none;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}
.sd-more a:hover { background: var(--bg-tertiary); }
.sd-more a i { margin-right: 6px; }

/* ── Video parts bar ── */
.video-parts-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 0px 0 20px;
    border-bottom: 1px solid var(--border-color);
}
.parts-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-right: 4px;
    white-space: nowrap;
}
.part-btn {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    text-decoration: none;
    transition: all 0.15s;
}
.part-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}
.part-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
}

/* ===== Telegram Banner ===== */
.tg-banner {
    display: none;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    margin-top: 14px;
}

.tg-banner.visible {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.tg-banner.hiding {
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
}

.tg-banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 16px;
    background-color: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.tg-banner-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tg-icon {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #ff4458, #ff6b9d);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
    flex-shrink: 0;
}

.tg-text {
    display: flex;
    align-items: center;
}

.tg-text span {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    line-height: 1.4;
}

.tg-text span strong {
    color: var(--text-primary);
    font-weight: 700;
}

.tg-banner-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.tg-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    background: linear-gradient(135deg, #ff4458, #ff6b9d);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    transition: filter 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.tg-btn:hover {
    filter: brightness(1.1);
    box-shadow: 0 4px 12px rgba(255, 68, 88, 0.3);
}

.tg-close {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.08);
    background: none;
    color: var(--text-secondary);
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.tg-close:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text-primary);
}

@media (max-width: 600px) {
    .tg-text span { display: inline; }
}

/* Profile tabs & lists */
.profile-google-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(66,133,244,0.15);
    color: #4285f4;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    font-size: 13px;
    margin-left: 8px;
    vertical-align: middle;
}

.profile-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 6px;
}
.profile-tab {
    flex: 1;
    padding: 9px 14px;
    border: none;
    border-radius: 7px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.profile-tab:hover { color: var(--text-primary); background: rgba(255,255,255,0.05); }
.profile-tab.active { background: var(--bg-secondary); color: var(--text-primary); }
.profile-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: rgba(255,68,88,0.18);
    color: var(--accent-primary);
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
}
.profile-tab.active .profile-tab-count { background: rgba(255,68,88,0.3); }
.profile-tab-content { display: none; }
.profile-tab-content.active { display: block; }
.profile-list {
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 10px;
    overflow: hidden;
}
.profile-list-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background 0.15s;
}
.profile-list-item:last-child { border-bottom: none; }
.profile-list-item:hover { background: rgba(255,255,255,0.03); }
.profile-list-item-comment { align-items: flex-start; }
.profile-list-thumb {
    width: 80px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    background: var(--bg-secondary);
}
.profile-list-info { flex: 1; min-width: 0; }
.profile-list-title {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}
.profile-list-title:hover { color: var(--accent-primary); }
.profile-list-meta { font-size: 12px; color: var(--text-secondary); display: flex; align-items: center; gap: 6px; }
.profile-comment-text { font-size: 13px; color: var(--text-secondary); margin: 4px 0; line-height: 1.4; }
.profile-badge-pending {
    display: inline-block;
    font-size: 11px;
    background: rgba(255,193,7,0.15);
    color: #ffc107;
    border-radius: 4px;
    padding: 1px 6px;
}
.profile-remove-form { flex-shrink: 0; }
.profile-remove-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-secondary);
    border-radius: 6px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: all 0.2s;
}
.profile-remove-btn:hover { background: rgba(255,68,88,0.15); border-color: rgba(255,68,88,0.4); color: #ff4458; }
.profile-remove-btn-danger { color: var(--accent-primary); border-color: rgba(255,68,88,0.2); }
.profile-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 10px;
}
.profile-empty i { font-size: 32px; margin-bottom: 10px; display: block; opacity: 0.4; }
.profile-empty p { margin: 0; font-size: 14px; }

/* ─── Follow system ─────────────────────────────────────────────────── */
.page-header-bottom {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}
.page-header-bottom .page-count { margin: 0; }

.entity-follow-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 18px;
    border-radius: 30px;
    border: 1.5px solid rgba(255,68,88,0.5);
    background: transparent;
    color: var(--accent-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    transition: all 0.2s;
}
.entity-follow-btn:hover { background: rgba(255,68,88,0.12); border-color: var(--accent-primary); }
.entity-follow-btn.following { background: rgba(255,68,88,0.15); border-color: var(--accent-primary); color: var(--text-primary); }
.entity-follow-btn:disabled { opacity: .6; cursor: not-allowed; }
.entity-follow-count {
    background: rgba(255,68,88,0.15);
    color: var(--accent-primary);
    border-radius: 20px;
    padding: 1px 8px;
    font-size: 11px;
    font-weight: 700;
}

/* Playlist follow button */
.playlist-action-follow {
    background: transparent;
    border: 1.5px solid rgba(255,68,88,0.5);
    color: var(--accent-primary);
}
.playlist-action-follow:hover { background: rgba(255,68,88,0.12); }
.playlist-action-follow.following { background: rgba(255,68,88,0.15); border-color: var(--accent-primary); color: var(--text-primary); }

/* ─── Watchlists discovery page ─────────────────────────────────────── */
.watchlists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 24px;
}
.watchlist-card {
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s, transform 0.2s;
    position: relative;
    display: flex;
    flex-direction: column;
}
.watchlist-card:hover { border-color: rgba(255,68,88,0.3); transform: translateY(-3px); }
.watchlist-card-link {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    text-decoration: none;
    color: inherit;
    flex: 1;
}
.watchlist-card-icon {
    width: 46px;
    height: 46px;
    background: rgba(255,68,88,0.12);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--accent-primary);
    flex-shrink: 0;
}
.watchlist-card-body { flex: 1; min-width: 0; }
.watchlist-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.watchlist-card-link:hover .watchlist-card-title { color: var(--accent-primary); }
.watchlist-card-desc { font-size: 12px; color: var(--text-secondary); margin-bottom: 8px; line-height: 1.4; }
.watchlist-card-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-secondary);
    flex-wrap: wrap;
}
.watchlist-card-meta i { color: var(--accent-primary); }
.watchlist-follow-btn {
    margin: 0 16px 14px;
    padding: 7px 14px;
    border-radius: 20px;
    border: 1.5px solid rgba(255,68,88,0.4);
    background: transparent;
    color: var(--accent-primary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    width: fit-content;
}
.watchlist-follow-btn:hover { background: rgba(255,68,88,0.12); }
.watchlist-follow-btn.following { background: rgba(255,68,88,0.15); border-color: var(--accent-primary); color: var(--text-primary); }
.watchlist-follow-btn:disabled { opacity: .6; cursor: not-allowed; }

/* ─── Profile entity grid (followed actresses/actors) ───────────────── */
.profile-entity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 12px;
}
.profile-entity-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-primary);
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 14px 8px;
    transition: all 0.2s;
}
.profile-entity-card:hover { border-color: rgba(255,68,88,0.3); transform: translateY(-2px); color: var(--accent-primary); }
.profile-entity-img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-secondary);
}
.profile-entity-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--text-secondary);
}
.profile-entity-name {
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    line-height: 1.3;
    word-break: break-word;
}
.profile-watchlist-icon {
    width: 42px;
    height: 42px;
    background: rgba(255,68,88,0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--accent-primary);
    flex-shrink: 0;
}

/* ===== 404 ERROR PAGE ===== */
.error-page {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}
.error-page-inner {
    display: flex;
    align-items: center;
    gap: 40px;
    max-width: 680px;
    width: 100%;
}
.error-page-code {
    font-size: 120px;
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(135deg, var(--accent-primary), #c0392b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    flex-shrink: 0;
    letter-spacing: -4px;
}
.error-page-divider {
    width: 2px;
    height: 120px;
    background: linear-gradient(to bottom, transparent, rgba(255,68,88,0.5), transparent);
    flex-shrink: 0;
}
.error-page-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 12px;
    color: var(--text-primary);
}
.error-page-text {
    color: var(--text-secondary);
    margin: 0 0 28px;
    font-size: 15px;
    line-height: 1.6;
}
.error-page-actions { display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 600px) {
    .error-page-inner { flex-direction: column; text-align: center; gap: 24px; }
    .error-page-divider { width: 60px; height: 2px; }
    .error-page-code { font-size: 80px; }
    .error-page-actions { justify-content: center; }
}

/* ===== PRIVATE PROFILE ===== */
.private-profile-wrap {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}
.private-profile-card {
    text-align: center;
    max-width: 380px;
    width: 100%;
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px;
    padding: 48px 32px;
}
.private-profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), #c0392b);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin: 0 auto 14px;
}
.private-profile-username {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 24px;
    color: var(--text-primary);
}
.private-profile-icon {
    font-size: 40px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    opacity: 0.5;
}
.private-profile-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 10px;
    color: var(--text-primary);
}
.private-profile-text {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0 0 28px;
    line-height: 1.6;
}

/* ===== HISTORY PAGE ===== */
.history-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}
.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}
.history-card {
    position: relative;
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    overflow: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, border-color 0.2s;
}
.history-card:hover {
    border-color: rgba(255,68,88,0.25);
}
.history-card-link {
    text-decoration: none;
    display: block;
    color: inherit;
}
.history-card-thumb {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--bg-tertiary);
}
.history-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.history-card:hover .history-card-thumb img {
    transform: scale(1.04);
}
.history-card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.38);
    opacity: 0;
    transition: opacity 0.2s ease;
}
.history-card-overlay i {
    font-size: 32px;
    color: #fff;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6));
}
.history-card:hover .history-card-overlay {
    opacity: 1;
}
.history-remaining {
    position: absolute;
    bottom: 22px;
    right: 8px;
    background: rgba(0,0,0,0.75);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 4px;
    backdrop-filter: blur(4px);
}
.history-part-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(255,68,88,0.85);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}
.history-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255,255,255,0.15);
}
.history-progress-fill {
    height: 100%;
    background: var(--accent-primary);
    transition: width 0.3s ease;
}
.history-card-body {
    padding: 12px 14px 14px;
}
.history-card-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0 0 6px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.history-card-date {
    font-size: 11px;
    color: var(--text-secondary);
}
.history-remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.65);
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s, background 0.2s;
    z-index: 2;
    backdrop-filter: blur(4px);
}
.history-card:hover .history-remove-btn {
    opacity: 1;
}
.history-remove-btn:hover {
    background: var(--accent-primary);
}
@media (max-width: 600px) {
    .history-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
}
