/* CSS Variables for theming */
:root {
    --bg-color: #0b0d13;
    --surface-color: #161a23;
    --surface-hover: #1f2532;
    --accent-color: #ff6b4a;
    --text-main: #ffffff;
    --text-muted: #8b929d;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --border-radius: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-family);
    line-height: 1.5;
    padding: 0 1.5rem;
    padding-bottom: 5.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* --- View Sections & Custom Utilities --- */
.view-section {
    display: none;
}

.view-section.active {
    display: block;
}

.social-card-custom {
    margin-bottom: 1rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.text-cyan { 
    color: #3db4f2 !important; 
}

/* --- Site Header Wrapper & Nav Fixes --- */
.site-header {
    margin-bottom: 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--bg-color);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 0;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-color);
    cursor: pointer;
}

.logo span { 
    color: var(--text-main); 
}

.nav-links {
    display: none;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* --- SEARCH BAR & ADVANCED FILTER PANEL --- */
.search-bar-wrapper {
    position: relative;
}

.search-input-group {
    display: flex;
    align-items: center;
    background-color: var(--surface-color);
    border-radius: 20px;
    padding: 2px 4px 2px 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: border-color 0.2s ease;
}

.search-input-group:focus-within {
    border-color: var(--accent-color);
}

.search-input-group .search-icon {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-right: 6px;
}

.search-input-group .search-bar {
    background: transparent;
    border: none;
    padding: 0.45rem 0.25rem;
    width: 150px;
    outline: none;
    color: var(--text-main);
    font-family: var(--font-family);
    font-size: 0.85rem;
}

.filter-toggle-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.4rem 0.6rem;
    cursor: pointer;
    position: relative;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.filter-toggle-btn:hover {
    color: var(--text-main);
}

.filter-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 7px;
    height: 7px;
    background-color: var(--accent-color);
    border-radius: 50%;
}

.search-submit-btn {
    background-color: var(--accent-color);
    color: #fff;
    border: none;
    padding: 0.35rem 0.85rem;
    border-radius: 14px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    margin-left: 4px;
    transition: opacity 0.2s;
}

.search-submit-btn:hover {
    opacity: 0.9;
}

/* Filter Panel Dropdown Popup */
.filter-panel {
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    width: 350px;
    background-color: #141822;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75);
    display: none;
    flex-direction: column;
    gap: 1.5rem;
    z-index: 1000;
}

.filter-panel.active {
    display: flex;
}

.filter-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 0.75rem;
}

.filter-panel-header h4 {
    font-size: 0.95rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.close-panel-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    transition: color 0.2s;
}

.close-panel-btn:hover {
    color: #fff;
}

.filter-panel-body {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.filter-group label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.genre-chips-select {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chip-option {
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    padding: 0.35rem 0.75rem;
    border-radius: 14px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.chip-option:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.25);
    background-color: rgba(255, 255, 255, 0.08);
}

.chip-option.selected {
    background-color: rgba(255, 107, 74, 0.18);
    border-color: var(--accent-color);
    color: var(--accent-color);
    font-weight: 600;
}

.year-range-inputs {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.year-range-inputs input {
    width: 100%;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 0.55rem 0.75rem;
    color: #fff;
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s;
}

.year-range-inputs input:focus {
    border-color: var(--accent-color);
}

.year-range-inputs span {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.filter-group input[type="range"] {
    width: 100%;
    accent-color: var(--accent-color);
    cursor: pointer;
    margin-top: 0.2rem;
}

.filter-panel-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1rem;
}

.filter-panel-footer button {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    border-radius: 8px;
}

/* --- Profile Avatar & Dropdown Menu --- */
.avatar-wrapper {
    position: relative;
    cursor: pointer;
}

.avatar {
    background-color: #6366f1;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    flex-shrink: 0;
    cursor: pointer;
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 190px;
    background-color: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.5rem 0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    display: none;
    flex-direction: column;
    z-index: 1000;
}

.profile-dropdown.active {
    display: flex;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    color: #94a3b8;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.dropdown-item i {
    font-size: 0.95rem;
    width: 18px;
    text-align: center;
}

.dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #f8fafc;
}

.dropdown-divider {
    height: 1px;
    background-color: rgba(255, 255, 255, 0.08);
    margin: 0.35rem 0;
}

.dropdown-item.danger:hover {
    color: #ef4444;
}

/* --- Navigation Link States --- */
.nav-links a,
.nav-links a:visited,
.nav-links a:active {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
    cursor: pointer;
}

.nav-links a:hover {
    color: var(--text-main);
}

.nav-links a.active {
    color: var(--accent-color);
    font-weight: 600;
}

/* --- Hero Section --- */
.hero {
    position: relative;
    background-image: linear-gradient(to right, #0b0d13 20%, transparent 60%), url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?q=80&w=2072&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    border-radius: 24px;
    padding: 3rem 1.5rem;
    min-height: 380px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-tag {
    background-color: rgba(255, 107, 74, 0.1);
    color: var(--accent-color);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    width: max-content;
    margin-bottom: 1rem;
}

.hero h1 {
    font-size: 2.75rem;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.hero h1 span { 
    color: var(--accent-color); 
}

.hero-meta {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.hero-meta .rating {
    color: #fbbf24;
    font-weight: 600;
}

.hero-desc {
    max-width: 400px;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: opacity 0.2s;
}

.btn:hover { 
    opacity: 0.9; 
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

/* --- Stats Row --- */
.stats-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background-color: var(--surface-color);
    padding: 1.25rem;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-card h3 { 
    font-size: 1.25rem; 
}

.stat-card p { 
    color: var(--text-muted); 
    font-size: 0.85rem; 
}

/* --- Section Headers & Filter Tabs --- */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.section-header h2 { 
    font-size: 1.25rem; 
}

.section-header p { 
    color: var(--text-muted); 
    font-size: 0.8rem; 
    margin-top: 0.25rem; 
}

.section-header a { 
    color: var(--accent-color); 
    text-decoration: none; 
    font-size: 0.85rem; 
}

.filter-tabs {
    display: flex;
    gap: 0.4rem;
    background-color: var(--surface-color);
    padding: 4px;
    border-radius: 8px;
}

.filter-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    color: var(--text-main);
}

.filter-btn.active {
    background-color: var(--accent-color);
    color: var(--text-main);
    font-weight: 600;
}

/* --- SEARCH RESULTS VIEW HEADER & SORTING --- */
.results-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 1rem;
}

.sort-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.sort-select {
    background-color: var(--surface-color);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
}

/* --- Movie Grid --- */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 3rem;
}

.movie-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    cursor: pointer;
}

.poster-wrapper {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    aspect-ratio: 2 / 3;
}

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

.movie-card:hover .poster-wrapper img { 
    transform: scale(1.05); 
}

.rating-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,0.6);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fbbf24;
    display: flex;
    align-items: center;
    gap: 4px;
}

.status-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: white;
    color: black;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
}

.movie-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-top: 0.5rem;
}

.movie-title { 
    font-size: 0.9rem; 
    font-weight: 600; 
}

.movie-meta { 
    font-size: 0.75rem; 
    color: var(--text-muted); 
}

.action-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--surface-color);
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.7rem;
    flex-shrink: 0;
}

/* --- Mobile Bottom Navigation --- */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--surface-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 999;
}

.mobile-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    text-decoration: none !important;
    font-size: 0.65rem;
    font-weight: 500;
    padding: 0.4rem 0.75rem;
    border-radius: 16px;
    transition: all 0.2s ease;
    flex: 1;
    color: var(--text-muted) !important;
    background-color: transparent;
}

.mobile-nav-link i,
.mobile-nav-link span {
    color: var(--text-muted) !important;
}

.mobile-nav-link i {
    font-size: 1.1rem;
}

.mobile-nav-link:hover {
    color: var(--text-main) !important;
}

.mobile-nav-link:hover i,
.mobile-nav-link:hover span {
    color: var(--text-main) !important;
}

.mobile-nav-link.active {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: var(--text-main) !important;
}

.mobile-nav-link.active i,
.mobile-nav-link.active span {
    color: var(--text-main) !important;
}

/* --- Responsive Breakpoint for Tablets & PC (>= 850px) --- */
@media (min-width: 850px) {
    body {
        padding: 0 2rem;
        padding-bottom: 2rem;
    }

    .mobile-nav {
        display: none;
    }

    .nav-links {
        display: flex;
        gap: 2rem;
        margin-left: 2rem;
    }

    .search-input-group .search-bar {
        width: 220px;
    }

    .hero {
        padding: 4rem 3rem;
        min-height: 400px;
    }

    .hero h1 {
        font-size: 3.5rem;
    }

    .stats-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 1.5rem;
    }
}

/* --- Social Page Layout --- */
.social-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    align-items: start;
    margin-top: 1.5rem;
}

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

/* --- Feed Cards --- */
.social-feed {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.feed-card {
    background-color: var(--surface-color, #161a23);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feed-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    color: #fff;
    flex-shrink: 0;
}

.avatar-orange { background-color: #e06d53; }
.avatar-purple { background-color: #6366f1; }
.avatar-teal   { background-color: #10b981; }
.avatar-indigo { background-color: #4f46e5; }
.avatar-blue   { background-color: #3b82f6; }

.user-meta {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.user-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #fff;
}

.user-handle, .user-sub {
    font-size: 0.8rem;
    color: var(--text-muted, #8b929d);
}

.more-btn {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.25rem;
}

.activity-text {
    font-size: 0.95rem;
    color: #e2e8f0;
    margin-bottom: 0.75rem;
}

.rating-highlight {
    color: #f59e0b;
    font-weight: 600;
}

/* --- Media Embed Inside Cards --- */
.media-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    overflow: hidden;
    cursor: pointer;
}

.media-card img {
    width: 48px;
    height: 64px;
    object-fit: cover;
    border-radius: 6px;
}

.media-info h4 {
    margin: 0;
    font-size: 0.95rem;
    color: #fff;
}

.media-info p {
    margin: 0.25rem 0 0 0;
    font-size: 0.8rem;
    color: #94a3b8;
}

.feed-actions {
    display: flex;
    gap: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 0.75rem;
}

.action-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    transition: color 0.2s;
}

.action-btn:hover {
    color: #fff;
}

/* --- Sidebar: People to Follow --- */
.sidebar-card {
    background-color: var(--surface-color, #161a23);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 1.25rem;
}

.sidebar-card h3 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    color: #fff;
}

.follow-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.follow-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-follow {
    background: none;
    border: none;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-color, #ff6b4a);
    cursor: pointer;
    margin-left: auto;
}

.btn-follow.following {
    color: #10b981;
}

/* --- Modal Backdrop & Global Overlay --- */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85); 
    -webkit-backdrop-filter: blur(8px); 
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.modal-backdrop.active {
    display: flex;
    opacity: 1;
}

.modal-container {
    background-color: #12131e;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
    overflow: hidden;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
}

/* --- ANILIST-STYLE MODAL LAYOUT --- */
.entry-modal {
    max-width: 860px;
    height: 560px;
    display: flex;
    flex-direction: column;
    background-color: #0f121a;
    border-radius: 12px;
    padding: 0;
}

.modal-header-banner {
    position: relative;
    height: 140px;
    background-size: cover;
    background-position: center;
    background-color: #1e293b;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 18, 26, 0.3) 0%, rgba(15, 18, 26, 0.95) 100%);
}

.modal-header-content {
    position: absolute;
    bottom: 1rem;
    left: 1.5rem;
    right: 1.5rem;
    display: flex;
    align-items: flex-end;
    gap: 1.25rem;
    z-index: 2;
}

.modal-poster-thumb {
    width: 85px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.6);
    border: 2px solid rgba(255, 255, 255, 0.1);
    margin-bottom: -10px;
}

.modal-title-area {
    flex: 1;
}

.modal-title-area h2 {
    font-size: 1.4rem;
    color: #fff;
    line-height: 1.2;
}

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

.btn-icon-fav {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s;
}

.btn-icon-fav.active, .btn-icon-fav:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
}

.btn-save-modal {
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
    border-radius: 8px;
}

/* Modal Body & Form Grid */
.modal-body-form {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.entry-form-grid {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 1.5rem;
}

@media (max-width: 700px) {
    .entry-form-grid {
        grid-template-columns: 1fr;
    }
}

.form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group.full-width {
    grid-column: span 3;
}

.modal-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.08em;
    margin-bottom: 0.2rem;
}

.modal-input, .modal-input-select, .modal-textarea {
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 0.6rem 0.85rem;
    color: #fff;
    font-family: inherit;
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s;
}

.modal-input:focus, .modal-input-select:focus, .modal-textarea:focus {
    border-color: var(--accent-color);
}

.modal-input-select option {
    background-color: #161a23;
    color: #fff;
}

.modal-textarea {
    height: 90px;
    resize: none;
}

.form-side-fields {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    padding-left: 1.25rem;
}

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

.custom-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #cbd5e1;
    cursor: pointer;
}

.btn-delete-entry {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    width: 100%;
}

.btn-delete-entry:hover {
    background: rgba(239, 68, 68, 0.25);
}

/* --- PROFILE PAGE STYLES --- */
.profile-banner-wrapper {
    position: relative;
    background-color: var(--surface-color);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-banner {
    height: 180px;
    background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 50%, #161a23 100%),
                url('https://images.unsplash.com/photo-1518709268805-4e9042af9f23?q=80&w=1200&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
}

.profile-header-content {
    display: flex;
    align-items: flex-end;
    gap: 1.5rem;
    padding: 0 2rem 1.25rem 2rem;
    margin-top: -45px;
    position: relative;
    flex-wrap: wrap;
}

.profile-avatar-lg {
    width: 90px;
    height: 90px;
    border-radius: 16px;
    background-color: #6366f1;
    color: #fff;
    font-size: 2.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid var(--surface-color);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.profile-user-info {
    flex: 1;
}

.profile-username-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.profile-username-row h1 {
    font-size: 1.75rem;
    color: #fff;
}

.profile-badge {
    background-color: rgba(255, 107, 74, 0.15);
    color: var(--accent-color);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.profile-action-btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Profile Tabs */
.profile-nav-tabs {
    display: flex;
    gap: 1.5rem;
    padding: 0 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background-color: rgba(0, 0, 0, 0.2);
    overflow-x: auto;
}

.profile-tab {
    padding: 1rem 0;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.profile-tab:hover {
    color: #fff;
}

.profile-tab.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
    font-weight: 600;
}

/* Profile Grid & Cards */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.5rem;
}

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

.profile-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.profile-card {
    background-color: var(--surface-color);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 1.5rem;
}

.profile-card h3 {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 1rem;
}

/* Genre Chip Display */
.genre-chips-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.genre-chip {
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid var(--chip-color, var(--accent-color));
    border-radius: 6px;
    padding: 0.5rem 0.85rem;
    display: flex;
    flex-direction: column;
}

.chip-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
}

.chip-count {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.genre-distribution-bar {
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    gap: 2px;
    background-color: rgba(255, 255, 255, 0.05);
}

.profile-media-mini-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    margin-bottom: 0;
}

/* Sidebar Stats Box */
.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.profile-stat-box {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 0.85rem 0.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
}

.stat-lbl {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.stat-progress-group {
    margin-bottom: 1rem;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.progress-bar-bg {
    height: 6px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background-color: var(--accent-color);
    border-radius: 3px;
}

/* --- PROFILE SUB-TAB TOGGLING & SLATE THEME --- */
.profile-tab-content {
    display: none;
    margin-top: 1.5rem;
}

.profile-tab-content.active {
    display: block;
}

/* --- ANILIST MEDIA LIST TAB --- */
.medialist-container {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 1.5rem;
}

@media (max-width: 850px) {
    .medialist-container {
        grid-template-columns: 1fr;
    }
}

.medialist-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.filter-box {
    position: relative;
    display: flex;
    align-items: center;
}

.filter-box .search-icon {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.filter-box input {
    width: 100%;
    background-color: var(--surface-color);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 0.6rem 0.75rem 0.6rem 2.2rem;
    color: #fff;
    font-size: 0.85rem;
}

.sidebar-heading {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.list-category-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.list-filter-btn {
    background: transparent;
    border: none;
    text-align: left;
    padding: 0.5rem 0.75rem;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.list-filter-btn:hover, .list-filter-btn.active {
    background-color: rgba(255, 255, 255, 0.05);
    color: #3db4f2;
    font-weight: 600;
}

.sidebar-select {
    width: 100%;
    background-color: var(--surface-color);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 0.85rem;
}

/* List Table View */
.medialist-main {
    background-color: var(--surface-color);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 1.5rem;
}

.list-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.view-toggle-btns {
    display: flex;
    gap: 4px;
    background: rgba(0,0,0,0.2);
    padding: 3px;
    border-radius: 6px;
}

.toggle-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 0.35rem 0.6rem;
    font-size: 0.85rem;
    border-radius: 4px;
    cursor: pointer;
}

.toggle-btn.active {
    background-color: #3db4f2;
    color: #fff;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.anilist-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.anilist-table th {
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.anilist-table td {
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: middle;
}

.anilist-table tr:hover td {
    background-color: rgba(255, 255, 255, 0.02);
}

.table-media-cell {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.table-thumb {
    width: 42px;
    height: 56px;
    object-fit: cover;
    border-radius: 4px;
}

/* --- FAVORITES TAB --- */
.favorites-section-card {
    background-color: var(--surface-color);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 1.5rem;
}

.favorites-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.btn-reorder {
    background-color: #3db4f2;
    color: #fff;
    border: none;
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
}

/* --- STATS TAB & CHARTS --- */
.stats-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1.5rem;
}

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

.stats-side-btn {
    width: 100%;
    background: transparent;
    border: none;
    text-align: left;
    padding: 0.6rem 0.75rem;
    color: var(--text-muted);
    font-size: 0.88rem;
    border-radius: 6px;
    cursor: pointer;
}

.stats-side-btn.active {
    background-color: rgba(255, 255, 255, 0.05);
    color: #3db4f2;
    font-weight: 600;
}

.stats-metrics-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.metric-pill {
    background-color: var(--surface-color);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.metric-icon {
    font-size: 1.25rem;
    color: #3db4f2;
}

.metric-val {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
}

.metric-lbl {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Bar Charts (Score & Episode Count) */
.chart-card {
    margin-bottom: 1.5rem;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.chart-toggle-pills {
    display: flex;
    gap: 4px;
    background: rgba(0, 0, 0, 0.3);
    padding: 3px;
    border-radius: 16px;
}

.pill-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.35rem 0.85rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pill-btn:hover {
    color: #fff;
}

.pill-btn.active {
    background-color: #3db4f2;
    color: #fff;
    font-weight: 600;
}

.bar-chart-container {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 180px;
    padding-top: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.chart-bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
    gap: 6px;
}

.bar-fill-inner {
    width: 100%;
    max-width: 28px;
    background-color: #3db4f2;
    border-radius: 4px 4px 0 0;
    transition: height 0.3s ease;
    min-height: 2px;
}

.bar-count-lbl {
    font-size: 0.7rem;
    color: #fff;
    font-weight: 600;
}

.bar-x-lbl {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* 3-Column Donut Cards Layout */
.distribution-cards-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

@media (max-width: 992px) {
    .distribution-cards-row {
        grid-template-columns: 1fr;
    }
}

.donut-card {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
}

.donut-card h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: #fff;
}

.donut-card-body {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex: 1;
}

.donut-chart-svg {
    width: 90px;
    height: 90px;
    transform: rotate(-90deg);
    flex-shrink: 0;
}

.donut-legend-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}

.legend-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    padding: 0.35rem 0.6rem;
    font-size: 0.8rem;
}

.legend-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #e2e8f0;
    font-weight: 500;
}

.legend-badge {
    color: #fff;
    font-weight: 700;
    padding: 0.15rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    min-width: 42px;
    text-align: center;
}

/* Distribution Grid Fallback */
.distribution-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.distribution-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.dist-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.dist-bar-wrapper {
    flex: 1;
    margin: 0 1rem;
    height: 6px;
    background: rgba(255,255,255,0.05);
    border-radius: 3px;
    overflow: hidden;
}

.dist-bar-fill {
    height: 100%;
    background-color: #3db4f2;
}

/* Line Charts & Smooth Curves */
.line-chart-wrapper {
    width: 100%;
    height: 200px;
    position: relative;
    margin-top: 1rem;
}

.line-chart-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.chart-line-path {
    fill: none;
    stroke: #3db4f2;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.chart-node {
    fill: #3db4f2;
    stroke: var(--surface-color, #161a23);
    stroke-width: 3;
    cursor: pointer;
    transition: r 0.2s ease;
}

.chart-node:hover {
    r: 7;
}

.chart-val-lbl {
    fill: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    text-anchor: middle;
}

.chart-x-lbl {
    fill: var(--text-muted);
    font-size: 0.75rem;
    text-anchor: middle;
}

/* --- SOCIAL TAB (3 ROWS) --- */
.social-rows-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.social-row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.user-horizontal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.user-mini-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-posts-feed {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* --- GENRES STATS PAGE STYLES --- */
.genres-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.genres-section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
}

.genres-sort-pills {
    display: flex;
    background-color: rgba(255, 255, 255, 0.06);
    padding: 3px;
    border-radius: 20px;
    gap: 4px;
}

.genres-pill-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 6px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.genres-pill-btn:hover {
    color: #ffffff;
}

.genres-pill-btn.active {
    background-color: #3db4f2;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(61, 180, 242, 0.4);
}

.genres-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

.genre-card {
    background-color: #151f2e;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.genre-card:hover {
    transform: translateY(-2px);
    border-color: rgba(61, 180, 242, 0.3);
}

.genre-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.genre-card-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.genre-rank-badge {
    background-color: #3db4f2;
    color: #ffffff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.genre-card-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.genre-stat-val {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2px;
}

.genre-stat-lbl {
    font-size: 0.75rem;
    color: #8ba0b2;
}

.genre-card-posters {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.genre-card-posters img {
    width: 100%;
    height: 95px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
/* --- EDIT PROFILE MODAL STYLES --- */
:root {
    --user-accent-color: #3db4f2;
}

.edit-profile-modal-content {
    max-width: 720px;
    width: 90%;
    background: #0b1622;
    border-radius: 8px;
    color: #9fadbd;
}

.edit-profile-body {
    max-height: 75vh;
    overflow-y: auto;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.edit-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.edit-label {
    font-size: 14px;
    font-weight: 600;
    color: #edf1f5;
}

.edit-hint {
    font-size: 11px;
    color: #5c6b7a;
    margin: 0;
}

/* Color Swatches */
.color-swatches {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.color-swatch {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.color-swatch:hover {
    transform: scale(1.05);
}

.color-swatch.active {
    border-color: #ffffff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

.custom-gradient-swatch {
    background: linear-gradient(135deg, #3db4f2, #ff90d5);
}

/* Site Themes */
.theme-options {
    display: flex;
    gap: 12px;
}

.theme-box {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.theme-light { background: #edf1f5; color: #0b1622; }
.theme-dim { background: #151f2e; color: #edf1f5; }
.theme-dark { background: #0b1622; color: #3db4f2; }
.theme-contrast { background: linear-gradient(135deg, #ffffff 50%, #000000 50%); color: #3db4f2; }

.theme-box.active {
    border-color: var(--user-accent-color, #3db4f2);
    box-shadow: 0 0 8px var(--user-accent-color, #3db4f2);
}

/* Rich Formatting Toolbar */
.editor-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #152232;
    padding: 6px 10px;
    border-radius: 6px 6px 0 0;
    border: 1px solid #1e2d3d;
    border-bottom: none;
    flex-wrap: wrap;
}

.editor-toolbar button {
    background: transparent;
    border: none;
    color: #8ba0b5;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: color 0.15s, background 0.15s;
}

.editor-toolbar button:hover {
    background: #1f3146;
    color: #edf1f5;
}

.toolbar-separator {
    width: 1px;
    height: 18px;
    background: #243547;
    margin: 0 4px;
}

#editAboutTextarea {
    background: #111e2e;
    border: 1px solid #1e2d3d;
    border-radius: 0 0 6px 6px;
    color: #edf1f5;
    padding: 12px;
    font-size: 13px;
    resize: vertical;
    outline: none;
}

#editAboutTextarea:focus {
    border-color: var(--user-accent-color, #3db4f2);
}

/* File Upload Containers */
.upload-container {
    display: flex;
    gap: 16px;
    align-items: center;
}

.drop-zone {
    flex: 1;
    height: 140px;
    border: 2px dashed #223344;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    background: #111d2a;
    transition: border-color 0.2s, background 0.2s;
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--user-accent-color, #3db4f2);
    background: #152538;
}

.drop-zone p {
    font-size: 12px;
    color: #7a8b9e;
    margin: 0;
}

.highlight-upload {
    color: var(--user-accent-color, #3db4f2);
    font-weight: 600;
}

.upload-preview-box {
    width: 140px;
    height: 140px;
    border-radius: 6px;
    overflow: hidden;
    background: #152232;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #1e2d3d;
    position: relative;
}

.upload-preview-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-preview-box {
    width: 220px;
}

.preview-placeholder {
    color: #3a4b5c;
    font-size: 28px;
}

/* Privacy Checkbox */
.custom-checkbox-container {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    font-size: 13px;
    color: #9fadbd;
}

.custom-checkbox-container input {
    width: 18px;
    height: 18px;
    accent-color: var(--user-accent-color, #3db4f2);
    cursor: pointer;
}

/* Theme Dynamic CSS Overrides */
body[data-theme="dim"] {
    background-color: #111923 !important;
}
body[data-theme="light"] {
    background-color: #f0f3f6 !important;
    color: #111923 !important;
}
body[data-theme="contrast"] {
    background-color: #000000 !important;
}
/* --- Horizontal Scrolling Rows --- */
.movie-row {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    padding-bottom: 1.5rem;
    scroll-behavior: smooth;
    align-items: flex-start; /* CRITICAL FIX: Stops flexbox from stretching cards vertically */
    /* Hide scrollbar */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.movie-row::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

/* Bulletproof sizing for the scrolling cards */
.movie-row .movie-card {
    flex: 0 0 160px; /* Exact width, no shrinking/growing */
    width: 160px;
    min-width: 160px; /* Prevents large images from breaking the container width */
    display: flex;
    flex-direction: column;
}

/* Hardcode the dimensions of the poster to prevent aspect-ratio blowout */
.movie-row .poster-wrapper {
    width: 160px;       
    height: 240px;      
    min-height: 240px;
    flex-shrink: 0;
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
}

.movie-row .poster-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- See More Card --- */
.see-more-card {
    flex: 0 0 160px; 
    width: 160px;
    min-width: 160px;
    height: 240px; /* Match the exact poster height */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-muted);
}

.see-more-card:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.see-more-card i {
    font-size: 2rem;
}
/* --- ROW SCROLL ARROW BUTTONS --- */
.row-scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 44px;
    height: 90px;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    outline: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: background 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
    opacity: 0.85;
    border-radius: 6px;
    user-select: none;
}

.row-scroll-btn:hover {
    background: rgba(15, 23, 42, 0.95);
    opacity: 1;
    transform: translateY(-50%) scale(1.06);
    color: var(--accent-color, #3db4f2);
}

.row-scroll-btn.left {
    left: 4px;
}

.row-scroll-btn.right {
    right: 4px;
}

/* Ensure parent container is positioned relatively for arrow placement */
.row-container, .movie-row-wrapper, [id$="Row"] {
    scroll-behavior: smooth;
}