/* Variables */
:root {
    --bg-color: #000000;
    --second-bg: #141414;
    --accent-color: #e50914; /* Netflix Red */
    --accent-hover: #b80710;
    --text-color: #ffffff;
    --text-muted: #c5c5c5;
    --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Light Mode Variables */
body.light-mode {
    --bg-color: #f8f9fa;
    --second-bg: #ffffff;
    --accent-color: #d90429;
    --accent-hover: #ef233c;
    --text-color: #2b2d42;
    --text-muted: #8d99ae;
}

body.light-mode #navbar {
    background: linear-gradient(180deg, rgba(255,255,255,0.9) 0%, transparent 100%);
}

body.light-mode #navbar.scrolled {
    background-color: var(--bg-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

body.light-mode .hero::before {
    background: linear-gradient(90deg, rgba(248, 249, 250, 0.9) 0%, rgba(248, 249, 250, 0.4) 60%, transparent 100%);
}

body.light-mode .hero-fade-bottom {
    background-image: linear-gradient(180deg, transparent, rgba(248, 249, 250, 0.61), #f8f9fa);
}

body.light-mode .details-hero-fade {
    background: linear-gradient(0deg, var(--bg-color) 0%, rgba(248,249,250,0.7) 40%, rgba(248,249,250,0.4) 100%);
}

body.light-mode .anime-card::after {
    background: linear-gradient(180deg, transparent 50%, rgba(255,255,255,0.9) 100%);
}

body.light-mode .anime-info-title {
    color: #111;
}

body.light-mode .anime-card {
    border: 1px solid #e9ecef;
}

body.light-mode .search-box {
    background-color: rgba(255, 255, 255, 0.6);
    border: 1px solid #ced4da;
}

body.light-mode .search-box input {
    color: var(--text-color);
}

body.light-mode .episode-item {
    border: 1px solid #dee2e6;
}

body.light-mode .admin-form-container,
body.light-mode .admin-manage-container {
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border: 1px solid #dee2e6;
}

body.light-mode .form-group input, 
body.light-mode .form-group textarea,
body.light-mode .form-group select {
    background-color: #fff;
    border: 1px solid #ced4da;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Navbar CSS */
#navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 70px;
    padding: 0 4%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: background-color 0.4s ease;
    background: linear-gradient(180deg, rgba(0,0,0,0.8) 0%, transparent 100%);
}

#navbar.scrolled {
    background-color: var(--bg-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.logo .highlight {
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

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

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

.search-box {
    display: flex;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--second-bg);
    border-radius: 4px;
    padding: 0.4rem 0.8rem;
    transition: var(--transition);
}

.search-box:focus-within {
    border-color: var(--text-muted);
    background-color: rgba(0, 0, 0, 0.8);
}

.search-box i {
    color: var(--text-muted);
    font-size: 1rem;
}

.search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-color);
    padding-left: 0.5rem;
    width: 200px;
    font-family: inherit;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.profile-icon img {
    width: 35px;
    height: 35px;
    border-radius: 4px;
    cursor: pointer;
}

/* Genre Filter */
.genre-filter {
    background-color: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--second-bg);
    border-radius: 4px;
    padding: 0.4rem 0.8rem;
    color: var(--text-color);
    outline: none;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

body.light-mode .genre-filter {
    background-color: rgba(255,255,255,0.6);
    border: 1px solid #ced4da;
}

/* Hero Section */
.hero {
    position: relative;
    height: 85vh;
    background-size: cover;
    background-position: center top;
    background-color: var(--second-bg);
    display: flex;
    align-items: center;
    padding: 0 4%;
    transition: background-image 0.5s ease;
}

/* Dark gradient overlay over the background image */
.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, rgba(11, 12, 16, 0.9) 0%, rgba(11, 12, 16, 0.4) 60%, transparent 100%);
}

.hero-fade-bottom {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 7.4rem;
    background-image: linear-gradient(180deg, transparent, rgba(11, 12, 16, 0.61), #0b0c10);
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 600px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn {
    padding: 0.8rem 1.8rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

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

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: scale(1.05);
}

.btn-secondary {
    background-color: rgba(109, 109, 110, 0.7);
    color: white;
    margin-left: 1rem;
}

.btn-secondary:hover {
    background-color: rgba(109, 109, 110, 0.9);
    transform: scale(1.05);
}

/* Admin Form Styles */
.admin-form-container {
    background-color: var(--second-bg);
    padding: 2.5rem;
    border-radius: 8px;
    max-width: 600px;
    margin: 5rem auto 2rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.05);
}

.admin-form-container h2 {
    color: var(--text-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.form-group input, 
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.1);
    background-color: rgba(0,0,0,0.5);
    color: var(--text-color);
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus, 
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-color);
    background-color: rgba(11, 12, 16, 0.9);
}

.input-ico {
    position: relative;
    margin-bottom: 1.5rem;
}
.input-ico label { display: none; }
.input-ico i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
    z-index: 2;
}
.input-ico input {
    padding-left: 3rem !important;
}

/* Bottom Mobile Navigation */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    width: 100%;
    background-color: var(--second-bg);
    border-top: 1px solid rgba(255,255,255,0.05);
    z-index: 1000;
    padding: 0.8rem 0;
    justify-content: space-around;
}

.bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.75rem;
    gap: 0.4rem;
    transition: var(--transition);
}

.bottom-nav .nav-item i {
    font-size: 1.2rem;
}

.bottom-nav .nav-item.active,
.bottom-nav .nav-item:hover {
    color: var(--accent-color);
}

/* ========== SITE FOOTER ========== */
.site-footer {
    background: linear-gradient(180deg, var(--bg-color) 0%, rgba(0,0,0,0.95) 100%);
    border-top: 1px solid rgba(255,255,255,0.05);
    margin-top: 2rem;
}

body.light-mode .site-footer {
    background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
    border-top: 1px solid #dee2e6;
}

.footer-top {
    padding: 4rem 4% 3rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
    max-width: 340px;
    margin-bottom: 1.5rem;
}

.footer-social {
    display: flex;
    gap: 0.8rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.footer-social a:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(229, 9, 20, 0.35);
}

body.light-mode .footer-social a {
    background: #fff;
    border: 1px solid #dee2e6;
    color: #495057;
}

body.light-mode .footer-social a:hover {
    background: var(--accent-color);
    color: #fff;
}

.footer-heading {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
}

.footer-links a:hover {
    color: var(--accent-color);
    transform: translateX(4px);
}

/* Footer Bottom Bar */
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 1.5rem 4%;
}

body.light-mode .footer-bottom {
    border-top: 1px solid #dee2e6;
}

.footer-bottom-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-copyright {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

.footer-bottom-links {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.footer-bottom-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.25s ease;
}

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

.footer-separator {
    opacity: 0.3;
}

/* Disclaimer */
.footer-disclaimer {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 4% 2rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    opacity: 0.6;
    line-height: 1.6;
    text-align: center;
}

/* Footer Responsive */
@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .footer-top {
        padding: 2.5rem 4% 2rem;
    }
    .footer-bottom-inner {
        flex-direction: column;
        text-align: center;
    }
}

/* Horizontal Scroll Sections */
.row-section {
    padding: 1rem 4% 2rem;
}

.section-title {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.slider-container {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding: 20px 0;
    scroll-behavior: smooth;
    /* Hide scrollbar */
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}

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

/* Anime Card styles */
.anime-card {
    position: relative;
    flex: 0 0 200px;
    height: 300px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    background-color: var(--second-bg);
}

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

.anime-card:hover {
    transform: scale(1.05);
    z-index: 10;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.anime-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 100%;
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.9) 100%);
    opacity: 0;
    transition: var(--transition);
}

.anime-card:hover::after {
    opacity: 1;
}

.anime-info {
    position: absolute;
    bottom: -50px;
    left: 0;
    width: 100%;
    padding: 10px;
    z-index: 20;
    transition: var(--transition);
}

.anime-card:hover .anime-info {
    bottom: 0;
}

.anime-info-title {
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 5px;
}

.anime-info-meta {
    font-size: 0.75rem;
    color: var(--accent-color);
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.anime-info-meta .score {
    color: #ffd700;
}

/* Grid container for search / genre results */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    padding: 10px 0;
}

.grid-container .anime-card {
    flex: unset;
    width: 100%;
    height: 280px;
}

/* Search Results Section */
#search-section {
    padding: 100px 4% 2rem;
    min-height: 80vh;
}

.search-results-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.search-back-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.1);
    background: var(--second-bg);
    color: var(--text-color);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

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

body.light-mode .search-back-btn {
    border: 1px solid #dee2e6;
}

.search-results-count {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.2rem;
}

/* Loading Spinner */
.loader {
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top: 4px solid var(--accent-color);
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal CSS */
.modal {
    display: none; 
    position: fixed; 
    z-index: 2000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    background-color: rgba(0, 0, 0, 0.9); 
    backdrop-filter: blur(5px);
    overflow: hidden;
}

.modal-content {
    position: relative;
    margin: 5% auto;
    width: 80%;
    max-width: 900px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    background-color: #000;
    border-radius: 8px;
    animation: scaleUp 0.3s ease;
}

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

.close-modal {
    color: #aaa;
    position: absolute;
    right: 15px;
    top: 5px;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
    transition: var(--transition);
}

.close-modal:hover,
.close-modal:focus {
    color: #fff;
    text-decoration: none;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
}

.video-container iframe,
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

/* Anime Details Modal */
.details-modal-content {
    padding: 0;
    max-width: 1000px;
    background-color: var(--bg-color);
    overflow-y: auto;
    max-height: 90vh;
}

/* Custom scrollbar for details modal */
.details-modal-content::-webkit-scrollbar {
    width: 8px;
}
.details-modal-content::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 4px;
}

.details-hero {
    position: relative;
    height: 400px;
    display: flex;
    align-items: flex-end;
    padding: 2rem;
}

.details-hero-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover;
    background-position: center 20%;
    z-index: 1;
}

.details-hero-fade {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(0deg, var(--bg-color) 0%, rgba(0,0,0,0.7) 40%, rgba(0,0,0,0.4) 100%);
    z-index: 2;
}

.details-hero-content {
    position: relative;
    z-index: 3;
    width: 100%;
}

.details-bottom {
    padding: 2rem;
    background-color: var(--bg-color);
}

.episodes-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.episodes-list::-webkit-scrollbar {
    width: 6px;
}
.episodes-list::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}

.episode-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background-color: var(--second-bg);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.episode-item:hover {
    background-color: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.1);
}

.episode-info {
    display: flex;
    flex-direction: column;
}

.episode-title {
    font-weight: 600;
    font-size: 1rem;
}

.episode-number {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.episode-play-icon {
    font-size: 1.2rem;
    color: var(--accent-color);
    opacity: 0;
    transition: var(--transition);
}

.episode-item:hover .episode-play-icon {
    opacity: 1;
}

/* Player Episode Cards */
.player-episode-card {
    background-color: var(--second-bg);
    border-radius: 4px;
    padding: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
}

body.light-mode .player-episode-card {
    border: 1px solid #dee2e6;
}

.player-episode-card:hover {
    background-color: rgba(229, 9, 20, 0.1);
    border-color: var(--accent-color);
}

.player-episode-card.active {
    border-color: var(--accent-color);
    background-color: rgba(229, 9, 20, 0.2);
}

.player-ep-title {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.player-ep-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Admin Management List CSS */
.admin-list-item {
    display: flex;
    align-items: center;
    background-color: #000;
    padding: 0.8rem;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.05);
    gap: 1rem;
}

.admin-list-img {
    width: 60px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.admin-list-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.admin-list-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

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

.admin-item-actions {
    display: flex;
    gap: 0.5rem;
}

.admin-action-btn {
    background: #333;
    border: none;
    color: #fff;
    width: 35px;
    height: 35px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

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

.admin-action-btn.delete-btn:hover {
    background: #d90429;
}

/* --- ADMIN LAYOUT --- */
.admin-layout {
    display: flex;
    height: 100vh;
    background-color: var(--bg-color);
}

.admin-sidebar {
    width: 260px;
    background-color: var(--second-bg);
    border-right: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
    padding-top: 2rem;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
}

body.light-mode .admin-sidebar {
    border-right: 1px solid #dee2e6;
}

.admin-logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
    text-align: center;
    margin-bottom: 2rem;
    padding: 0 1.5rem;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0 1rem;
}

.admin-nav-item {
    padding: 0.8rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 6px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.admin-nav-item i {
    width: 20px;
    text-align: center;
}

.admin-nav-item:hover, .admin-nav-item.active {
    background-color: rgba(229, 9, 20, 0.1);
    color: var(--accent-color);
}

.admin-main {
    flex: 1;
    margin-left: 260px; /* offset sidebar */
    padding: 3rem 4%;
    overflow-y: auto;
    height: 100vh;
}

.admin-view {
    animation: fadeIn 0.3s ease;
}

/* Admin Analytics Circular Graphs */
.admin-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 2rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--second-bg);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-width: 200px;
    gap: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

body.light-mode .stat-card {
    border: 1px solid #dee2e6;
}

.stat-card h4 {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin: 0;
    font-weight: 600;
}

.circle-graph {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: conic-gradient(var(--circle-color) calc(var(--percentage) * 1%), rgba(255,255,255,0.05) 0);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: background 1s ease-out;
}

body.light-mode .circle-graph {
    background: conic-gradient(var(--circle-color) calc(var(--percentage) * 1%), rgba(0,0,0,0.05) 0);
}

.circle-inner {
    width: 106px;
    height: 106px;
    border-radius: 50%;
    background-color: var(--second-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
}

/* --- Admin Form Styles (Modern Premium UI) --- */
.admin-form-container {
    background: linear-gradient(145deg, rgba(30, 30, 35, 0.8), rgba(20, 20, 25, 0.9));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    max-width: 800px;
}

body.light-mode .admin-form-container {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.8), rgba(245, 245, 245, 0.9));
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    padding: 1rem 1.2rem;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

body.light-mode .form-group input, 
body.light-mode .form-group select, 
body.light-mode .form-group textarea {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--text-color);
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.2);
}

body.light-mode .form-group input:focus, 
body.light-mode .form-group select:focus, 
body.light-mode .form-group textarea:focus {
    background: #fff;
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.1);
}

.form-group input::placeholder, 
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

body.light-mode .form-group input::placeholder, 
body.light-mode .form-group textarea::placeholder {
    color: rgba(0, 0, 0, 0.3);
}

/* Make submit buttons in form bigger */
#admin-submit-btn, #admin-cancel-edit-btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 8px;
    letter-spacing: 1px;
}

/* Tables for Users */
.admin-table-container {
    background-color: var(--second-bg);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
}

body.light-mode .admin-table-container {
    border: 1px solid #dee2e6;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th, .admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

body.light-mode .admin-table th, body.light-mode .admin-table td {
    border-bottom: 1px solid #dee2e6;
}

.admin-table th {
    background-color: rgba(0,0,0,0.2);
    color: var(--text-muted);
    font-weight: 500;
}

body.light-mode .admin-table th {
    background-color: #f1f3f5;
}

.badge {
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}
.badge-admin { background-color: rgba(229, 9, 20, 0.2); color: var(--accent-color); }
.badge-user { background-color: rgba(0, 123, 255, 0.2); color: #007bff; }
.badge-active { background-color: rgba(40, 167, 69, 0.2); color: #28a745; }
.badge-banned { background-color: rgba(220, 53, 69, 0.2); color: #dc3545; }

/* Responsive */
@media (max-width: 900px) {
    .admin-layout {
        flex-direction: column;
    }
    
    .admin-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding-top: 1rem;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
    }
    
    .admin-nav {
        flex-direction: row;
        overflow-x: auto;
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .admin-main {
        margin-left: 0;
        padding: 1rem;
        height: auto;
    }
}
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .bottom-nav {
        display: flex;
    }

    body {
        padding-bottom: 70px; /* Offset for bottom nav */
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .search-box {
        padding: 0.3rem 0.5rem;
    }

    .search-box input {
        width: 100px;
        font-size: 0.8rem;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .nav-left {
        gap: 1rem;
    }
    
    .hidden-mobile {
        display: none !important;
    }
    
    .modal-content {
        width: 100%;
        margin: 0;
        height: 100%;
        border-radius: 0;
        max-height: 100vh;
    }
    
    .details-hero {
        height: 250px;
        padding: 1rem;
    }
    
    .hero-title, #details-title {
        font-size: 1.8rem !important;
    }
    
    .details-bottom {
        padding: 1rem;
    }
    
    .anime-card {
        flex: 0 0 140px;
        height: 210px;
    }
    
    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }
    
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* --- Request Anime Floating Action Button --- */
#request-anime-fab {
    position: fixed;
    bottom: 90px;
    right: 30px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--accent-color), #ff4d6d);
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    z-index: 1500;
    box-shadow: 0 6px 30px rgba(229, 9, 20, 0.45), inset 0 1px 0 rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: fabFloat 3s ease-in-out infinite;
}

#request-anime-fab:hover {
    transform: scale(1.18) translateY(-4px);
    box-shadow: 0 12px 40px rgba(229, 9, 20, 0.6);
}

@keyframes fabFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@media (max-width: 768px) {
    #request-anime-fab {
        bottom: 80px;
        right: 16px;
        width: 52px;
        height: 52px;
        font-size: 1.2rem;
    }
}

/* --- Request Modal (Redesigned - Vertical Stack) --- */
#request-modal {
    overflow-y: auto !important;
}

.request-modal-content {
    max-width: 520px !important;
    width: 92% !important;
    background-color: var(--bg-color) !important;
    border-radius: 20px !important;
    overflow: visible !important;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 25px 80px rgba(0,0,0,0.6);
    margin: 3% auto !important;
}

.request-modal-layout {
    display: flex;
    flex-direction: column;
}

/* Decorative Top Banner */
.request-modal-deco {
    background: linear-gradient(135deg, #1a0005 0%, var(--accent-color) 55%, #ff4d6d 100%);
    color: #fff;
    padding: 2rem 2rem 1.8rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
}

.request-deco-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    top: -100px;
    right: -80px;
    border-radius: 50%;
    pointer-events: none;
}

.request-deco-icon {
    font-size: 2.5rem;
    margin-bottom: 0.6rem;
    display: block;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
    animation: decoIconPulse 2s ease-in-out infinite alternate;
}

@keyframes decoIconPulse {
    from { transform: scale(1) rotate(0deg); }
    to { transform: scale(1.06) rotate(4deg); }
}

.request-modal-deco h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.request-modal-deco p {
    font-size: 0.85rem;
    opacity: 0.85;
    line-height: 1.4;
    max-width: 320px;
    margin: 0 auto;
}

.request-deco-stats {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-top: 1.2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.18);
}

.request-deco-stats div {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.request-deco-stats strong {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1;
}

.request-deco-stats span {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.65;
    margin-top: 0.2rem;
}

/* Form Area */
.request-modal-form {
    padding: 2rem 2.2rem 2.5rem;
}

.request-modal-form h2 {
    display: none; /* Title is in the banner now */
}

.request-submit-btn {
    width: 100%;
    padding: 1rem !important;
    font-size: 1.1rem !important;
    font-weight: bold !important;
    letter-spacing: 1px;
    border-radius: 10px !important;
    margin-top: 0.5rem;
}

@media (max-width: 600px) {
    .request-modal-content {
        width: 96% !important;
        margin: 2% auto !important;
        border-radius: 16px !important;
    }
    .request-modal-deco {
        padding: 1.5rem 1.5rem 1.2rem;
        border-radius: 16px 16px 0 0;
    }
    .request-deco-icon { font-size: 2rem; }
    .request-modal-deco h3 { font-size: 1.2rem; }
    .request-deco-stats { gap: 1.5rem; }
    .request-modal-form { padding: 1.5rem; }
}

/* --- Request Badge (Sidebar Notification) --- */
.request-badge {
    background: linear-gradient(135deg, var(--accent-color), #ff4d6d);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    margin-left: 8px;
    min-width: 22px;
    text-align: center;
    line-height: 1.5;
    box-shadow: 0 2px 8px rgba(229, 9, 20, 0.4);
    animation: badgeBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes badgeBounce {
    0% { transform: scale(0); }
    60% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

/* --- Admin Requests Header --- */
.requests-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.requests-stats-mini {
    display: flex;
    gap: 0.8rem;
}

.req-stat-pill {
    background: var(--second-bg);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 30px;
    padding: 0.5rem 1.2rem;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
}

body.light-mode .req-stat-pill {
    border: 1px solid #dee2e6;
}

/* --- Admin Requests Filter Tabs --- */
.requests-filter-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid rgba(255,255,255,0.05);
    padding-bottom: 0.8rem;
}

body.light-mode .requests-filter-tabs {
    border-bottom: 2px solid #dee2e6;
}

.req-tab {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: inherit;
}

.req-tab:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-color);
}

body.light-mode .req-tab:hover {
    background: rgba(0,0,0,0.05);
}

.req-tab.active {
    background: rgba(229, 9, 20, 0.12);
    color: var(--accent-color);
}

/* --- Admin Requests List --- */
.admin-requests-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.request-card {
    background: var(--second-bg);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 0;
    display: flex;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

body.light-mode .request-card {
    border: 1px solid #dee2e6;
}

.request-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    border-color: rgba(229, 9, 20, 0.2);
}

.request-card-stripe {
    width: 5px;
    flex-shrink: 0;
}

.request-card-stripe.pending {
    background: linear-gradient(180deg, #ffc107, #ff9800);
}

.request-card-stripe.approved {
    background: linear-gradient(180deg, #28a745, #20c997);
}

.request-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
    margin: 1.2rem 0 1.2rem 1.2rem;
}

.request-card-icon.pending {
    background: rgba(255, 193, 7, 0.12);
    color: #ffc107;
}

.request-card-icon.approved {
    background: rgba(40, 167, 69, 0.12);
    color: #28a745;
}

.request-card-body {
    flex: 1;
    min-width: 0;
    padding: 1.2rem 1.2rem 1.2rem 1rem;
}

.request-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    gap: 1rem;
}

.request-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.request-card-status {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 3px 10px;
    border-radius: 20px;
    flex-shrink: 0;
}

.request-card-status.pending {
    background: rgba(255, 193, 7, 0.15);
    color: #ffc107;
}

.request-card-status.approved {
    background: rgba(40, 167, 69, 0.15);
    color: #28a745;
}

.request-card-meta {
    font-size: 0.82rem;
    color: var(--text-muted);
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
    margin-bottom: 0.4rem;
}

.request-card-meta i {
    margin-right: 3px;
    opacity: 0.6;
}

.request-card-message {
    font-size: 0.85rem;
    color: var(--text-muted);
    background: rgba(255,255,255,0.03);
    border-left: 3px solid rgba(255,255,255,0.1);
    border-radius: 0 6px 6px 0;
    padding: 0.5rem 0.8rem;
    margin-top: 0.6rem;
    font-style: italic;
}

body.light-mode .request-card-message {
    background: rgba(0,0,0,0.03);
    border-left-color: rgba(0,0,0,0.1);
}

.request-card-actions {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
    align-self: center;
    padding-right: 1.2rem;
}

.request-card-actions .admin-action-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    font-size: 0.9rem;
}

