/*
================================
--- Foundation: Colors & Fonts ---
================================
*/
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&family=Poppins:wght@600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Monoton&display=swap');
@import url('logo-animations.css');
@import url('modern-animations.css');

:root {
    --color-background: #101418;
    --color-surface: #191E24;
    --color-primary: #e50914;
    --color-primary-hover: #f40612;
    --color-text-primary: #f0f0f0;
    --color-text-secondary: #a9a9a9;
    --color-border: #2a313a;
    --color-accent: #ff6b35;
    --color-success: #28a745;
    --color-warning: #ffc107;
    --color-error: #dc3545;

    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --shadow-small: 0 2px 8px rgba(0, 0, 0, 0.15);
    --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.25);
    --shadow-large: 0 8px 40px rgba(0, 0, 0, 0.35);
    --shadow-glow: 0 0 20px rgba(229, 9, 20, 0.3);
    
    --border-radius-small: 6px;
    --border-radius-medium: 12px;
    --border-radius-large: 20px;
    
    --transition-fast: 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-medium: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-slow: 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/*
================================
--- General Body & Layout Styles ---
================================
*/
body {
    font-family: var(--font-body);
    margin: 0;
    background: linear-gradient(135deg, var(--color-background) 0%, #0a0c0f 100%);
    color: var(--color-text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(229, 9, 20, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 107, 53, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/*
================================
--- Header & Navigation ---
================================
*/
header {
    background: rgba(25, 30, 36, 0.95);
    backdrop-filter: blur(20px);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-medium);
    transition: all var(--transition-medium);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Monoton', cursive;
    font-size: 2.5rem;
    font-weight: 400;
    letter-spacing: 1px;
    color: var(--color-primary);
    text-decoration: none;
    text-shadow: 0 0 20px rgba(229, 9, 20, 0.6);
    text-transform: none;
    display: flex;
    align-items: center;
}

.logo-image {
    height: 50px;
    width: auto;
    transition: all var(--transition-medium);
    filter: drop-shadow(0 0 10px rgba(229, 9, 20, 0.3));
}

.logo-image:hover {
    transform: scale(1.05) rotate(2deg);
    filter: drop-shadow(0 0 20px rgba(229, 9, 20, 0.6));
    animation: glow 2s ease-in-out infinite;
}

/* Fallback text logo if image fails to load */
.logo-image:not([src]),
.logo-image[src=""] {
    display: none;
}

.logo-image:not([src]) + .logo-text,
.logo-image[src=""] + .logo-text {
    display: inline;
    font-family: 'Monoton', cursive;
    font-size: 2.5rem;
    color: var(--color-primary);
    text-shadow: 0 0 20px rgba(229, 9, 20, 0.6);
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

nav a {
    color: var(--color-text-secondary);
    font-weight: 500;
    text-decoration: none;
    padding: 0.7rem 1.2rem;
    transition: all var(--transition-medium);
    display: block;
    border-radius: var(--border-radius-small);
    position: relative;
    overflow: hidden;
}

nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(229, 9, 20, 0.2), transparent);
    transition: left 0.5s ease;
}

nav a:hover::before {
    left: 100%;
}

nav a:hover {
    color: white;
    background: linear-gradient(45deg, var(--color-primary), var(--color-accent));
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.category-link.active {
    color: white;
    background: linear-gradient(45deg, var(--color-primary), var(--color-accent));
    font-weight: 700;
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    background: rgba(25, 30, 36, 0.95);
    backdrop-filter: blur(20px);
    min-width: 180px;
    box-shadow: var(--shadow-large);
    z-index: 1;
    border-radius: var(--border-radius-medium);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    transform: translateY(10px);
    opacity: 0;
    transition: all var(--transition-medium);
}

.dropdown-content a:hover {
    background: linear-gradient(45deg, var(--color-primary), var(--color-accent));
    color: white !important;
    transform: translateX(5px);
}

.dropdown:hover .dropdown-content {
    display: block;
    transform: translateY(0);
    opacity: 1;
}

.search-container {
    position: relative;
}

.search-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.search-container input {
    padding: 0.8rem 1.2rem;
    border-radius: var(--border-radius-medium);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(34, 34, 34, 0.8);
    backdrop-filter: blur(10px);
    color: var(--color-text-primary);
    width: 280px;
    transition: all var(--transition-medium);
    font-size: 0.95rem;
    box-shadow: var(--shadow-small);
}

.search-container input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 
        0 0 0 3px rgba(229, 9, 20, 0.2),
        var(--shadow-medium);
    transform: scale(1.02);
    background: rgba(34, 34, 34, 0.95);
}

.search-container input::placeholder {
    color: var(--color-text-secondary);
    transition: color var(--transition-fast);
}

.search-container input:focus::placeholder {
    color: rgba(169, 169, 169, 0.7);
}

.search-filters {
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.search-filters.active {
    opacity: 1;
    max-height: 50px;
}

.search-filters select {
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    border: 1px solid var(--color-border);
    background-color: #222;
    color: var(--color-text-primary);
    font-size: 0.85rem;
    cursor: pointer;
}

.search-filters select:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* Category Header with Controls */
.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.view-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sort-controls select {
    padding: 0.5rem 0.8rem;
    border-radius: 5px;
    border: 1px solid var(--color-border);
    background-color: var(--color-surface);
    color: var(--color-text-primary);
    cursor: pointer;
}

.view-toggle {
    display: flex;
    gap: 0.25rem;
    border: 1px solid var(--color-border);
    border-radius: 5px;
    overflow: hidden;
}

.view-btn {
    background: var(--color-surface);
    border: none;
    color: var(--color-text-secondary);
    padding: 0.5rem 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-btn.active,
.view-btn:hover {
    background: var(--color-primary);
    color: white;
}

/* List View Styles */
.video-grid.list-view {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.video-grid.list-view .video-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    gap: 1rem;
    flex-direction: row;
}

.video-grid.list-view .video-item img {
    width: 80px;
    height: 120px;
    flex-shrink: 0;
}

.video-grid.list-view .video-item h3 {
    white-space: normal;
    flex: 1;
    padding: 0;
    margin: 0;
}

.video-grid.list-view .poster-container {
    flex-shrink: 0;
}

/* Enhanced Trending Section */
.trending-section {
    background: linear-gradient(135deg, 
        rgba(25, 30, 36, 0.9) 0%, 
        rgba(16, 20, 24, 0.95) 50%,
        rgba(26, 31, 38, 0.9) 100%);
    backdrop-filter: blur(20px);
    padding: 2.5rem;
    border-radius: var(--border-radius-large);
    margin-bottom: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-large);
    position: relative;
    overflow: hidden;
}

.trending-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 70%, rgba(229, 9, 20, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.trending-badge {
    background: linear-gradient(45deg, var(--color-accent), var(--color-primary));
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    display: inline-block;
    box-shadow: var(--shadow-glow);
    animation: pulse 2s infinite;
    position: relative;
    z-index: 2;
}

/* Quality Badge */
.quality-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #28a745;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Rating Display */
.rating-display {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.8);
    color: #ffc107;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Watchlist Button */
.watchlist-btn {
    position: absolute;
    top: 10px;
    right: 40px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.watchlist-btn:hover {
    background: var(--color-primary);
    transform: scale(1.1);
}

.watchlist-btn.added {
    background: var(--color-primary);
    color: white;
}


/*
================================
--- Main Content, Grids & Rows ---
================================
*/
main {
    padding: 2.5rem 1rem;
}

.category-row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.category-row-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 0;
    color: var(--color-text-primary);
    font-weight: 700;
    position: relative;
    transition: all var(--transition-medium);
    padding-left: 1rem;
}

.category-row-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: linear-gradient(45deg, var(--color-primary), var(--color-accent));
    border-radius: 2px;
}

.category-row-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 1rem;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    transition: width 0.5s ease;
}

.category-row-title:hover::after {
    width: calc(100% - 1rem);
}

.category-row-title:hover {
    transform: translateX(5px);
}

.see-all-link {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-medium);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-small);
    position: relative;
    overflow: hidden;
}

.see-all-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(229, 9, 20, 0.1), transparent);
    transition: left 0.3s ease;
}

.see-all-link:hover::before {
    left: 100%;
}

.see-all-link:hover {
    color: var(--color-primary);
    transform: translateX(5px);
}

.category-row {
    margin-bottom: 3rem;
}

/* --- UPDATED: Horizontal Scrolling for Homepage Rows --- */
#homepage-content .video-grid {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 1rem;
    padding-bottom: 1rem;
    scroll-snap-type: x mandatory;
}

/* --- Custom Scrollbar Styles --- */
#homepage-content .video-grid::-webkit-scrollbar { height: 8px; }
#homepage-content .video-grid::-webkit-scrollbar-track { background: var(--color-surface); border-radius: 10px; }
#homepage-content .video-grid::-webkit-scrollbar-thumb { background: #444; border-radius: 10px; }
#homepage-content .video-grid::-webkit-scrollbar-thumb:hover { background: #555; }

/* --- FIX: Make "See all" / Search View a Wrapping Grid --- */
#single-category-content .video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.video-item {
    background: linear-gradient(145deg, var(--color-surface), #1a1f26);
    border-radius: var(--border-radius-medium);
    overflow: hidden;
    text-decoration: none;
    color: var(--color-text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-medium);
    flex: 0 0 calc((100% - 5rem) / 6);
    scroll-snap-align: start;
    position: relative;
    box-shadow: var(--shadow-small);
}

.video-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(229, 9, 20, 0.1), transparent);
    opacity: 0;
    transition: opacity var(--transition-medium);
    z-index: 1;
}

.video-item:hover::before {
    opacity: 1;
}

/* --- Enhanced Hover effect for homepage --- */
#homepage-content .video-item:hover {
    transform: translateY(-12px) scale(1.03);
    box-shadow: 
        var(--shadow-large),
        0 0 30px rgba(229, 9, 20, 0.4);
    border-color: var(--color-primary);
}

#homepage-content .video-item:hover img {
    transform: scale(1.05);
}

#homepage-content .video-item:hover h3 {
    color: var(--color-primary);
}

.poster-container {
    position: relative;
}

.video-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-medium);
}

.video-item h3 {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    padding: 1rem;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color var(--transition-medium);
    position: relative;
    z-index: 2;
}

.badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--color-primary);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/*
================================
--- Details & Player Pages ---
================================
*/
.details-header {
    display: flex;
    gap: 2.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    background: var(--color-surface);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--color-border);
}

.details-thumbnail {
    max-width: 250px;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 5px 25px rgba(0,0,0,0.4);
}

.details-info { flex: 1; min-width: 300px; }
.details-info h1 {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    margin-top: 0;
}
.details-info hr {
    border: none;
    height: 1px;
    background-color: var(--color-border);
    margin: 1.5rem 0;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin-bottom: 1.5rem;
    background-color: #000;
    border-radius: 8px;
}
.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* --- Modern Enhanced Buttons --- */
.watch-now-button, .download-button, .ep-nav-button {
    background: linear-gradient(45deg, var(--color-primary), var(--color-accent));
    color: white;
    padding: 1rem 2rem;
    border-radius: var(--border-radius-medium);
    text-decoration: none;
    font-weight: 600;
    border: none;
    box-shadow: var(--shadow-medium);
    transition: all var(--transition-medium);
    display: inline-block;
    position: relative;
    overflow: hidden;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.watch-now-button::before, .download-button::before, .ep-nav-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.watch-now-button:hover::before, .download-button:hover::before, .ep-nav-button:hover::before {
    left: 100%;
}

.watch-now-button:hover, .download-button:hover, .ep-nav-button:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-large), var(--shadow-glow);
    background: linear-gradient(45deg, var(--color-primary-hover), var(--color-accent));
}

.season-title {
    font-family: var(--font-heading);
    margin-top: 2.5rem;
    border-bottom: 2px solid var(--color-border);
    padding-bottom: 0.5rem;
}
.episodes-table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.episodes-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--color-border);
    transition: background-color 0.3s;
}
.episodes-table tr:hover td { background-color: #20262d; }
.episodes-table td a { color: var(--color-primary); text-decoration: none; font-weight: bold; }
.episodes-table tr.active td {
    background-color: #381b1d;
    color: var(--color-text-primary);
}
.episodes-table tr.active td a {
    color: #fff;
    font-weight: bold;
}

.episode-nav-buttons {
    display: flex;
    justify-content: space-between;
    margin: 1.5rem 0;
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, #2a313a 25%, #3a4149 50%, #2a313a 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.skeleton-item {
    background-color: var(--color-surface);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.skeleton-poster {
    width: 100%;
    height: 250px;
    background: var(--color-border);
}

.skeleton-title {
    height: 20px;
    background: var(--color-border);
    margin: 1rem;
    border-radius: 4px;
}

/* Performance Improvements */
.video-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --color-background: #000000;
        --color-surface: #1a1a1a;
        --color-text-primary: #ffffff;
        --color-text-secondary: #cccccc;
        --color-border: #444444;
    }
}

/* Better focus indicators for accessibility */
button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Error State Styles */
.error-state {
    text-align: center;
    padding: 2rem;
    color: var(--color-text-secondary);
}

.error-state i {
    font-size: 3rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.retry-btn {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 1rem;
    transition: background 0.3s ease;
}

.retry-btn:hover {
    background: var(--color-primary-hover);
}

/* Notification System */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--color-surface);
    color: var(--color-text-primary);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--color-primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    border-left-color: #28a745;
}

.notification.error {
    border-left-color: #dc3545;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--color-primary-hover);
    transform: translateY(-2px);
}

/*
================================
--- Loader & Footer ---
================================
*/
#loader {
    border: 8px solid var(--color-border);
    border-top: 8px solid var(--color-primary);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 4rem auto;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
    border-top: 1px solid var(--color-border);
    color: var(--color-text-secondary);
}

/*
================================
--- Responsive Styles (Mobile) ---
================================
*/
@media (max-width: 820px) {

    .header-content { flex-wrap: wrap; }
    
    .logo-image {
        height: 40px; /* Smaller on mobile */
    }
    
    .mobile-icons { display: flex; align-items: center; gap: 1rem; }
    nav, .search-container { display: none; }

    nav { order: 3; width: 100%; margin-top: 1rem; }
    nav.active { display: block; }
    nav ul { flex-direction: column; width: 100%; }
    nav ul li { width: 100%; }
    nav ul li a { text-align: center; border-bottom: 1px solid var(--color-border); }
    .dropdown-content { position: static; display: block; box-shadow: none; border: none; background-color: #20262d; }
    .dropdown-content a { text-align: center; padding-left: 2rem; font-weight: normal; color: var(--color-text-secondary); }
    
    .search-container.active { display: block; order: 4; width: 100%; margin-top: 1rem; }
    
    .nav-toggle, .search-toggle-btn { display: block; background: transparent; border: 0; cursor: pointer; padding: 0; color: var(--color-text-primary); }
    .search-toggle-btn { font-size: 1.2rem; }
    .nav-toggle { width: 30px; height: 30px; position: relative; }

    .hamburger { display: block; position: relative; background-color: var(--color-text-primary); width: 100%; height: 3px; border-radius: 2px; transition: transform 0.3s ease-out; }
    .hamburger::before, .hamburger::after { content: ''; position: absolute; left: 0; background-color: var(--color-text-primary); width: 100%; height: 3px; border-radius: 2px; transition: all 0.3s ease-out; }
    .hamburger::before { top: -8px; }
    .hamburger::after { top: 8px; }
    .nav-toggle.active .hamburger { background-color: transparent; }
    .nav-toggle.active .hamburger::before { transform: rotate(45deg) translate(5px, 6px); }
    .nav-toggle.active .hamburger::after { transform: rotate(-45deg) translate(5px, -6px); }

    /* --- Mobile Grid Adjustments --- */
    #single-category-content .video-grid { 
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); 
        gap: 1rem; 
    }
    .video-item {
        flex-basis: 150px; /* Adjust item width for mobile scrolling */
    }
    
    #category-title, .category-row-title { font-size: 1.5rem; }
    .details-info h1 { font-size: 2rem; }
    .details-header { flex-direction: column; align-items: center; text-align: center; }
    .details-info { margin-top: 1.5rem; }
}

/* Hide mobile-only elements on desktop */
@media (min-width: 821px) {
    .mobile-icons {
        display: none;
    }
}

/* Admin Link Styling */
.admin-link {
    color: var(--color-text-muted) !important;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease;
    background: rgba(229, 9, 20, 0.1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-link:hover {
    background: var(--color-primary) !important;
    color: white !important;
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.3);
}

.admin-link i {
    font-size: 0.9rem;
}
