@import '../core/effects.css';

/* --- Global Reset & Body --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background: var(--bg-body);
    color: var(--text-main);
    overflow-x: hidden;
    width: 100%;
    min-height: 100vh;
}

/* --- Mobile Components --- */
.mobile-nav-toggle {
    display: none;
    font-size: 1.8rem;
    color: white;
    cursor: pointer;
    transition: 0.3s;
    z-index: var(--z-fixed);
    padding: 10px;
}

.close-sidebar {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.8rem;
    cursor: pointer;
    color: white;
    display: none;
    z-index: 10;
}

@media screen and (max-width: 1024px) {
    .mobile-nav-toggle, .close-sidebar {
        display: block;
    }
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

.hidden {
    display: none !important;
}

/* Scrollbar styling handled globally in effects.css */

/* --- Buttons & UI Components --- */
button {
    cursor: pointer;
    border: none;
    outline: none;
    font-family: inherit;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); /* Global smooth transition */
}

/* Global Click Effect */
button:active {
    transform: scale(0.95);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #b00710 100%);
    color: white;
    padding: 0.85rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.3), 0 0 0 1px rgba(255,255,255,0.05) inset;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    border: none;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 1;
}

/* Advanced Shimmer Effect */
.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        120deg, 
        transparent 0%, 
        transparent 30%, 
        rgba(255, 255, 255, 0.3) 45%, 
        transparent 60%, 
        transparent 100%
    );
    transform: skewX(-20deg);
    transition: 0s;
}

.btn-primary:hover::before {
    left: 100%;
    transition: 0.7s ease-in-out;
}

.btn-primary:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 
        0 15px 35px rgba(229, 9, 20, 0.5),
        0 5px 15px rgba(0, 0, 0, 0.3),
        inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, #ff1f2a 0%, #d4000d 100%);
}

.btn-primary:active {
    transform: scale(0.96) translateY(0);
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.3);
    filter: brightness(0.9);
}

/* Mobile & Tablet Optimizations */
@media screen and (max-width: 1024px) {
    .btn-primary {
        padding: 0.8rem 1.5rem; /* Slightly compact but touch-friendly */
        font-size: 0.9rem;
        -webkit-tap-highlight-color: transparent; /* Remove blue overlay */
    }

    /* On touch, hover effects can be sticky. We prioritize the active state. */
    .btn-primary:hover {
        transform: none; /* Reset hover lift on touch to prevent stuck states */
        box-shadow: 0 4px 15px rgba(229, 9, 20, 0.3);
        background: linear-gradient(135deg, var(--primary) 0%, #b00710 100%);
    }

    /* Stronger Active State for Touch Feedback */
    .btn-primary:active {
        transform: scale(0.94);
        background: #b00710;
        box-shadow: 0 2px 10px rgba(229, 9, 20, 0.2);
        transition: 0.1s; /* Instant feedback */
    }
    
    /* Auto-Shimmer for attention since no hover */
    .btn-primary::before {
        animation: mobileShimmer 3s infinite ease-in-out;
    }
}

@keyframes mobileShimmer {
    0%, 90% { left: -100%; }
    100% { left: 200%; }
}

.btn-glass {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    padding: 0.85rem 1.8rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    color: white;
}

.btn-glass:active {
    transform: scale(0.96);
    background: rgba(255, 255, 255, 0.05);
}

.btn-playing {
    background: #ffffff;
    color: #000000;
    padding: 1rem 2.2rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 5px 20px rgba(255, 255, 255, 0.2);
    border: none;
    position: relative;
    overflow: hidden;
}

/* Shine Effect for Playing */
.btn-playing::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.1), transparent);
    transition: 0.5s;
}

.btn-playing:hover::after {
    left: 100%;
}

.btn-playing:hover {
    transform: scale(1.05) translateY(-2px);
    background: #fff;
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.4);
}

.btn-playing:active {
    transform: scale(0.95);
}

/* Icon Button (Generic) */
.btn-icon {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: visible; /* Allow badge to pop out */
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: white;
    transform: rotate(15deg) scale(1.1);
    color: var(--primary);
}
.app-container {
    display: flex;
    width: 100%;
    height: 100vh;
}

.main-content {
    flex: 1;
    height: 100%;
    overflow-y: auto;
    position: relative;
    background: var(--bg-body);
}

/* --- Admin Buttons --- */
.btn-edit, .btn-toggle-admin, .btn-outline {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.6rem 1.2rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-edit:hover, .btn-toggle-admin:hover, .btn-outline:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn-delete, .btn-ban-user {
    background: rgba(229, 9, 20, 0.1);
    color: #ff4444;
    border: 1px solid rgba(229, 9, 20, 0.2);
    padding: 0.6rem 1.2rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-delete:hover, .btn-ban-user:hover {
    background: rgba(229, 9, 20, 0.2);
    border-color: #ff4444;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(229, 9, 20, 0.3);
    color: #ff1f1f;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    height: 100%;
    background: var(--bg-surface);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-normal);
    z-index: 100;
    animation: slideRight 0.8s var(--transition-normal);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 3.5rem;
    letter-spacing: -1px;
}

.logo span {
    color: var(--primary);
    position: relative;
    display: inline-block;
}

.logo span::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary);
    opacity: 0.3;
    border-radius: 2px;
}

.nav-links {
    flex: 1;
}

.nav-links li {
    margin-bottom: 0.5rem;
    animation: slideRight 0.5s var(--transition-normal) both;
}

.nav-links li:nth-child(1) {
    animation-delay: 0.1s;
}

.nav-links li:nth-child(2) {
    animation-delay: 0.2s;
}

.nav-links li:nth-child(3) {
    animation-delay: 0.3s;
}

.nav-links li:nth-child(4) {
    animation-delay: 0.4s;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-weight: 500;
    transition: var(--transition-fast);
}

.nav-links a:hover,
.nav-links li.active a {
    color: white;
    background: linear-gradient(90deg, rgba(229, 9, 20, 0.1), transparent);
    border-left: 3px solid var(--primary);
    transform: translateX(5px);
}

/* User Profile in Sidebar */
/* User Profile in Sidebar */
.user-profile {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    width: 100%;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    width: 100%;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.user-info:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.user-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid transparent; /* Prepare for gradient border if needed, or simple colored */
    background: #1a1a1a; /* Fallback */
    transition: transform 0.3s ease;
}

.user-info:hover img {
    transform: scale(1.1);
    border-color: var(--primary);
}

.user-info span {
    font-size: 0.95rem;
    font-weight: 600;
    color: #e0e0e0;
    letter-spacing: 0.3px;
    flex: 1; /* Push any future icons to right */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Header --- */
header {
    position: sticky;
    top: 0;
    height: var(--header-height);
    background: rgba(15, 16, 20, 0.85);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--container-padding);
    z-index: 90;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: padding 0.3s ease;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

#header_profile:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

/* Search Bar */
.search-bar {
    position: relative;
    max-width: 500px;
    width: 100%;
}

.search-bar i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    z-index: 5;
    pointer-events: none;
    font-size: 1.1rem;
    transition: var(--transition-fast);
}

.search-bar input {
    width: 100%;
    padding: 12px 15px 12px 50px;
    background: rgba(255, 255, 255, 0.05);
    border: var(--border-glass);
    border-radius: var(--radius-md);
    color: white;
    font-size: 0.95rem;
    transition: var(--transition-fast);
    backdrop-filter: var(--glass-blur);
}

.search-bar input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
    outline: none;
}

.search-bar input:focus+i {
    color: var(--primary);
}

/* Search Results */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 400px;
    overflow-y: auto;
    background: var(--bg-surface);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: none;
    z-index: 1000;
    margin-top: 10px;
}

.search-item {
    display: flex;
    align-items: center;
    padding: 10px;
    cursor: pointer;
    transition: 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.search-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.search-item img {
    width: 40px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 15px;
}

.search-item-info h4 {
    font-size: 0.9rem;
    color: white;
    margin-bottom: 4px;
}

.search-item-info span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.no-result {
    padding: 15px;
    color: var(--text-muted);
    text-align: center;
}

/* --- Mobile Nav --- */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 520px;
    background: rgba(15, 15, 15, 0.9);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    transition: var(--transition-medium);
}

.bottom-nav-item {
    background: transparent;
    border: none;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 15px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 20px;
    position: relative;
    flex: 1;
    overflow: hidden;
}

.bottom-nav-item::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(229, 9, 20, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    transition: 0.4s;
}

.bottom-nav-item.active::before {
    transform: translate(-50%, -50%) scale(1);
}

.bottom-nav-item i {
    font-size: 1.4rem;
    transition: inherit;
    z-index: 2;
}

.bottom-nav-item span {
    font-weight: 600;
    opacity: 0.7;
    transition: inherit;
    z-index: 2;
}

.bottom-nav-item.active {
    color: white;
}

.bottom-nav-item.active i {
    color: var(--primary);
    transform: translateY(-2px);
    filter: drop-shadow(0 0 8px var(--primary-glow));
}

.bottom-nav-item.active span {
    opacity: 1;
    transform: translateY(-1px);
}

.bottom-nav-item:active {
    transform: scale(0.92);
}

.bottom-nav-item[onclick*="window.location.href='index.html'"] {
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    margin-right: 4px;
}

/* --- Responsive Sidebar --- */
.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.close-sidebar {
    display: none;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 99;
    display: none;
    animation: fadeIn 0.3s;
}

.sidebar.active+.main-content .sidebar-overlay,
.sidebar.active~.sidebar-overlay,
.sidebar.active~.main-content .sidebar-overlay,
#sidebar_overlay.active {
    display: block;
}

@media screen and (max-width: 1024px) {
    .sidebar {
        width: 80px;
        padding: 2rem 0.5rem;
    }

    .sidebar .logo h2,
    .sidebar .nav-links span,
    .sidebar .user-info span {
        display: none;
    }

    .sidebar .nav-links a {
        justify-content: center;
        padding: 15px;
    }

    .sidebar .nav-links i {
        font-size: 1.5rem;
        margin: 0;
    }

    .hide-mobile {
        display: none !important;
    }
    
    /* Responsive Header Padding override */
    header {
        padding: 0 1.5rem;
    }
}

/* Grid Header */
.grid-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--container-padding) 1.5rem var(--container-padding);
    margin-top: 1rem;
}

.grid-header h3 {
    font-size: var(--fs-h3);
    font-weight: 700;
}

/* Manage Button (Beautiful Style) */
.btn-manage {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
}

.btn-manage:hover {
    background: rgba(229, 9, 20, 0.1); /* Primary tint */
    border-color: var(--primary);
    color: white;
    box-shadow: 0 0 15px rgba(229, 9, 20, 0.4);
    transform: translateY(-2px);
}

.btn-manage:active {
    transform: scale(0.95);
}

.btn-manage i {
    font-size: 1rem;
}

@media screen and (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }

    .sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        bottom: 0;
        width: 280px;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
        display: flex !important;
    }

    .sidebar.active {
        left: 0;
    }

    .close-sidebar {
        display: block;
        position: absolute;
        top: 15px;
        right: 15px;
        font-size: 2rem;
        color: var(--text-muted);
    }

    /* Mobile Header Tweaks */
    header {
        padding: 0 1rem; /* Less padding on sides */
        gap: 10px;
    }

    .search-bar {
        max-width: none;
        flex: 1; /* Search takes available space */
    }

    .search-bar input {
        padding: 10px 15px 10px 40px; /* Compact input padding */
        font-size: 0.9rem;
    }

    .search-bar i {
        left: 12px;
        font-size: 1rem;
    }

    .header-actions {
        gap: 0.8rem; /* Tighter spacing for icons */
    }

    .header-actions .btn-icon {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }

    .user-info img {
        width: 38px;
        height: 38px;
    }


    .sidebar .logo h2,
    .sidebar .nav-links span,
    .sidebar .user-info span {
        display: block;
    }

    .sidebar .nav-links a {
        justify-content: flex-start;
    }

    .mobile-toggle { display: none; }

    .bottom-nav {
        display: flex;
    }


    header {
        padding: 0 1rem;
    }

    .header-actions {
        gap: 0.8rem;
    }

    .main-content {
        padding-bottom: 120px;
    }
}

@media screen and (min-width: 769px) {
    #header_profile {
        display: none !important;
    }
}

/* --- Animations --- */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes blurIn {
    from {
        opacity: 0;
        filter: blur(10px);
    }

    to {
        opacity: 1;
        filter: blur(0);
    }
}

/* Video Player Overlay */
.video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.5s;
}

.video-wrapper {
    width: 90%;
    height: 80%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
}

.video-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    color: white;
}

.video-header h3 {
    font-size: 1.5rem;
}

.video-header button {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: 0.3s;
}

.video-header button:hover {
    color: var(--primary);
    transform: scale(1.1);
}

.video-wrapper iframe {
    width: 100%;
    flex: 1;
    border: none;
    border-radius: var(--radius-md);
    box-shadow: 0 0 50px rgba(229, 9, 20, 0.2);
}
/* --- Global Modal Styles --- */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s;
}

.modal.hidden {
    display: none !important;
}

.modal-content {
    background: #1a1a1a;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: fadeUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.modal-header h3 {
    margin: 0;
    color: white;
    font-size: 1.25rem;
}

.close-modal {
    font-size: 1.5rem;
    color: #888;
    cursor: pointer;
    transition: 0.3s;
}

.close-modal:hover {
    color: var(--primary);
    transform: rotate(90deg);
}

/* --- Global Movie Card Styles --- */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    padding: var(--container-padding);
    padding-top: 1rem;
    animation: fadeIn 0.5s;
}

.grid-container .movie-card {
    height: 280px;
}

.movie-card {
    min-width: 200px;
    height: 300px;
    border-radius: var(--radius-md);
    position: relative;
    transition: var(--transition-spring);
    cursor: pointer;
    overflow: hidden;
    animation: scaleIn 0.5s var(--transition-normal) both;
    border: var(--border-glass);
    background: var(--bg-surface);
}

.movie-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-normal);
}

.movie-card:hover {
    transform: scale(1.08) translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8), 0 0 25px rgba(229, 9, 20, 0.4);
    z-index: 50;
    border-color: rgba(229, 9, 20, 0.5);
}

.movie-card:hover img {
    filter: brightness(0.6);
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    background: linear-gradient(to top, black, transparent);
    opacity: 0;
    transition: 0.3s;
    transform: translateY(20px);
}

.movie-card:hover .card-overlay {
    opacity: 1;
    transform: translateY(0);
}

.card-overlay h4 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.card-details {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #ccc;
}

.rating {
    color: var(--accent-gold);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Watchlist Remove Button */
.btn-remove-watchlist {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    font-size: 1.2rem;
    line-height: 1;
    transition: 0.3s;
    opacity: 0;
    pointer-events: none;
}

.edit-mode .btn-remove-watchlist {
    opacity: 1;
    pointer-events: auto;
}

.btn-remove-watchlist:hover {
    background: red;
    transform: scale(1.1);
}



/* --- Notifications --- */
.notification-wrapper {
    position: relative;
    z-index: 101;
}

.notif-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--primary);
    color: white;
    border-radius: 10px; /* Pill shape */
    border: 2px solid #0f1014; /* Cutout effect from background */
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
}

.notif-badge:not(.hidden) {
    animation: popIn 0.3s forwards;
}

@keyframes popIn {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}

.notification-dropdown {
    position: absolute;
    top: 120%;
    right: -10px;
    width: 320px;
    background: rgba(20, 20, 25, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    transform-origin: top right;
    animation: dropdownFade 0.2s ease-out;
    display: flex;
    flex-direction: column;
}

@keyframes dropdownFade {
    0% { opacity: 0; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1); }
}

.notif-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
}

.notif-header span {
    font-weight: 600;
    font-size: 0.95rem;
    color: white;
}

.text-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: 0.2s;
}

.text-btn:hover {
    background: rgba(229, 9, 20, 0.1);
}

.notif-list {
    max-height: 350px;
    overflow-y: auto;
    padding: 0;
}

.notif-item {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.notif-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.notif-item.unread {
    background: rgba(229, 9, 20, 0.05);
    border-left: 3px solid var(--primary);
}

.notif-icon {
    width: 32px; /* Fixed width container */
    height: 32px;
    min-width: 32px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 0.9rem;
}

.notif-content {
    flex: 1;
}

.notif-msg {
    font-size: 0.85rem;
    color: #e0e0e0;
    line-height: 1.4;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notif-date {
    font-size: 0.7rem;
    color: #888;
}

.empty-notif {
    padding: 2rem;
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

/* Scrollbar for notif list */
.notif-list::-webkit-scrollbar {
    width: 4px;
}
.notif-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
}
