:root {
    /* --- COLOR PALETTE --- */
    --bg-deep: #050505;       /* Fondo base profundo */
    --bg-surface: #0a0a0a;    /* Superficies principales */
    --bg-panel: #121212;      /* Paneles y tarjetas */
    --bg-overlay: rgba(0, 0, 0, 0.7);
    
    /* Glass & Transparencies */
    --glass-heavy: rgba(18, 18, 18, 0.85);
    --glass-medium: rgba(20, 20, 20, 0.6);
    --glass-light: rgba(255, 255, 255, 0.05);
    
    /* Brand & Functional Colors */
    --primary: #f5a524;
    --primary-dim: rgba(245, 165, 36, 0.2);
    --primary-glow: rgba(245, 165, 36, 0.4);
    
    --accent: #ffffff;
    --text-main: #f0f0f0;
    --text-secondary: #a0a0a0;
    --text-tertiary: #606060;
    
    /* Status Colors */
    --success: #4ade80;
    --warning: #facc15;
    --error: #f87171;
    --info: #60a5fa;

    /* Borders & Separators */
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-light: rgba(255, 255, 255, 0.12);
    
    /* --- METRICS --- */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 9999px;
    
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 20px rgba(245, 165, 36, 0.15);
    
    /* --- ANIMATIONS --- */
    --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
    --duration-fast: 150ms;
    --duration-normal: 300ms;

    /* --- LEGACY COMPATIBILITY (Maps old vars to new system) --- */
    --bg-main: var(--bg-deep);
    --bg-dark: #000000;
    --bg-card: var(--bg-panel);
    --text-muted: var(--text-secondary);
    --border-color: var(--border-light);
    --accent-red: var(--error);
}

/* =========================================
   RESET & BASE
   ========================================= */

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-deep);
    /* Cinematic gradient background */
    background-image: 
        radial-gradient(circle at 50% 45%, #1a1a1a 0%, var(--bg-deep) 40%),
        linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.8) 100%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
    color: var(--primary);
}

main {
    flex: 1 0 auto;
    position: relative;
    z-index: 1;
}

/* =========================================
   UTILITIES & COMPONENTS
   ========================================= */

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

footer {
    flex-shrink: 0;
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    margin-top: auto;
}
 
.loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, #f5a524 0%, #ff6b81 50%, #0a0e17 100%);
    opacity: 0;
    transition: width .8s ease, opacity .3s ease;
    z-index: 9999;
}
.loading-bar.visible {
    opacity: 1;
}
.loading-bar.done {
    width: 100%;
}

/* Navbar */
.navbar-custom {
    background-color: var(--bg-main);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
}

.mobile-nav {
    width: 100%;
    margin-top: 6px;
}
.mobile-menu {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    align-items: center;
    width: 100%;
    list-style: none;
    padding: 0;
    margin: 0;
}
.mobile-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--text-main);
    background: transparent;
    font-weight: 600;
    font-size: 0.8rem;
}
.mobile-item i {
    font-size: 1.1rem;
}
.mobile-item[data-key="user"] i {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background-color: #1a202c;
	display: flex;
	align-items: center;
	justify-content: center;
}
.mobile-item span {
    display: none;
}
.mobile-item.active {
    background-color: var(--primary);
    color: #000;
    justify-content: flex-start;
}
.mobile-item.active span {
    display: inline;
}
@media (max-width: 992px) {
    .navbar-custom {
        padding: 0.75rem 1rem;
    }
    .navbar-brand {
        display: none !important;
    }
    .navbar .container-fluid {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
}

.navbar-brand img {
    height: 40px;
}

.nav-link {
    color: var(--text-main) !important;
    font-weight: 500;
    margin: 0 10px;
    transition: color 0.3s;
}

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

.btn-search {
    color: var(--text-main);
    font-size: 1.2rem;
}

.hero-card {
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s;
    height: 100%;
}

.hero-card:hover {
    transform: scale(1.02);
}

.hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 1rem;
    min-height: 380px;
}
.hero-item-left {
    grid-column: 1;
    grid-row: 1 / span 2;
}
.hero-item-top {
    grid-column: 2;
    grid-row: 1;
}
.hero-item-bottom {
    grid-column: 2;
    grid-row: 2;
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    padding: 20px;
}

/* Section Titles */
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.35rem;
    position: relative;
}

.section-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(to right, rgba(245,165,36,0.95), rgba(248,250,252,0));
}

.section-icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.03);
    color: var(--primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .section-icon-container {
        width: 48px;
        height: 48px;
        border-radius: 16px;
    }
}

.section-icon-glow {
    position: absolute;
    inset: 0;
    background-color: rgba(245, 165, 36, 0.1);
    filter: blur(20px);
    opacity: 0;
    transition: opacity 0.3s;
}

.section-icon-container:hover .section-icon-glow {
    opacity: 1;
}

.section-icon-svg {
    width: 20px;
    height: 20px;
    position: relative;
    z-index: 10;
}

@media (min-width: 768px) {
    .section-icon-svg {
        width: 24px;
        height: 24px;
    }
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.text-accent {
    color: var(--primary) !important;
}

/* Signup Promo Card (Home) */
.signup-promo-card {
    background: linear-gradient(
        180deg,
        #0a0a0a 0%,
        #050505 100%
    );
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    box-shadow:
        0 12px 30px rgba(0,0,0,0.45),
        inset 0 1px 0 rgba(255,255,255,0.03);
    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.25s ease;
}

/* Hover effect */
.signup-promo-card:hover {
    border-color: rgba(255, 145, 0, 0.6);
    box-shadow:
        0 18px 40px rgba(0,0,0,0.55),
        0 0 0 1px rgba(255, 145, 0, 0.35),
        0 0 18px rgba(255, 145, 0, 0.25);
    transform: translateY(-3px);
}


.promo-badge {
    display: inline-flex;
    width: fit-content;
    white-space: nowrap;
    background: rgba(245, 165, 36, 0.12); /* primary glass */
    color: #ffd58a;
    border: 1px solid rgba(245, 165, 36, 0.35);
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: none;
}
.promo-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.2px;
}
.promo-highlight {
    color: var(--primary);
}
.promo-subtitle {
    color: #cbd5e1;
    font-size: 0.9rem;
}
@media (max-width: 768px) {
    .promo-title { font-size: 1.2rem; }
    .promo-subtitle { font-size: 0.8rem; }
}

/* Image Loading Placeholders */
.img-loading-container {
    background-color: #1e293b;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Featured Hero Carousel */
.hero-featured-slide {
	position: relative;
	height: 500px;
	width: 100%;
	overflow: hidden;
	border-radius: 20px;
	background: #000;
}

.hero-featured-slide:not(.hero-skeleton-slide) {
    cursor: pointer;
}

.hero-featured-slide:not(.hero-skeleton-slide):hover .hero-featured-bg {
    transform: scale(1.15);
    filter: blur(5px) brightness(0.6);
}

/* Skeleton adaptado al Hero (mismo lenguaje visual que las cards) */
.hero-featured-slide.hero-skeleton-slide {
	background: radial-gradient(circle at 20% 0%, #020617 0%, #000 60%);
}

.hero-skeleton-slide .skeleton-cover {
	height: 100%;
}

.hero-skeleton-slide .skeleton-overlay {
	padding: 2.5rem 3rem;
	align-items: flex-start;
}

.hero-featured-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(5px) brightness(0.4);
    transform: scale(1.1);
    z-index: 1;
    transition: background-image 0.5s ease-in-out, transform 0.5s ease-out, filter 0.5s ease-out;
}

.hero-featured-content {
    position: relative;
    z-index: 10;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem 4rem;
    max-width: 800px;
}
@media (min-width: 769px) {
    .hero-featured-slide::before {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(to right,
            rgba(0, 0, 0, 0.65) 0%,
            rgba(0, 0, 0, 0.35) 40%,
            rgba(0, 0, 0, 0.05) 100%);
        border-radius: 20px;
        z-index: 5;
        pointer-events: none;
    }
}

.hero-tags {
    display: flex;
    gap: 10px;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 4px 12px;
    border-radius: 8px;

    /* Fondo Slate translúcido */
    background-color: rgba(148, 163, 184, 0.10);

    /* Borde tipo ring */
    border: 1px solid rgba(148, 163, 184, 0.20);

    /* Texto */
    color: #cbd5e1;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.4px;

    /* Sombras suaves */
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.1),
        inset 0 0 0 1px rgba(148, 163, 184, 0.1);
}

.hero-stats-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.star-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 4px 10px;
    border-radius: 8px;

    /* Fondo amarillo translúcido */
    background-color: rgba(234, 179, 8, 0.10); /* yellow-500/10 */

    /* Borde tipo ring */
    border: 1px solid rgba(234, 179, 8, 0.20); /* yellow-500/20 */

    /* Texto */
    color: #eab308; /* yellow-500 */
    font-weight: 700;
    font-size: 0.9rem;

    /* Sombras suaves */
    box-shadow:
        0 4px 12px rgba(234, 179, 8, 0.05),
        inset 0 0 0 1px rgba(234, 179, 8, 0.15);
}

.info-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    padding: 4px 10px;
    border-radius: 8px;

    /* Fondo Neutro/Glass */
    background-color: rgba(255, 255, 255, 0.08);

    /* Borde tipo ring */
    border: 1px solid rgba(255, 255, 255, 0.15);

    /* Texto */
    color: #f1f5f9;
    font-weight: 600;
    font-size: 0.9rem;

    /* Sombras suaves */
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.1),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.info-badge i {
    font-size: 0.8em;
}

.status-hero-ongoing {
    border-color: rgba(46, 204, 113, 0.5);
    color: #2ecc71;
    background-color: rgba(46, 204, 113, 0.1);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.1);
}
.status-hero-completed {
    border-color: rgba(52, 152, 219, 0.5);
    color: #3498db;
    background-color: rgba(52, 152, 219, 0.1);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.1);
}
.status-hero-paused {
    border-color: rgba(243, 156, 18, 0.5);
    color: #f39c12;
    background-color: rgba(243, 156, 18, 0.1);
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.1);
}
.status-hero-cancelled {
    border-color: rgba(231, 76, 60, 0.5);
    color: #e74c3c;
    background-color: rgba(231, 76, 60, 0.1);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.1);
}
.status-hero-dropped {
    border-color: rgba(149, 165, 166, 0.5);
    color: #95a5a6;
    background-color: rgba(149, 165, 166, 0.1);
    box-shadow: 0 4px 12px rgba(149, 165, 166, 0.1);
}

.type-badge-hero {
    text-transform: capitalize;
}

.hero-description {
    color: #cccccc;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 600px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    text-align: justify;
}

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

.btn-hero-primary {
    background: var(--primary);
    color: #000;
    border: none;
    padding: 12px 32px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.5px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(245, 165, 36, 0.3);
}

.btn-hero-primary:hover {
    background: #e69b22;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 165, 36, 0.5);
}

.btn-hero-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 12px 32px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    backdrop-filter: blur(10px);
    transition: all 0.2s;
}

.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Custom Navigation for Carousel */
.hero-nav-btn {
    position: absolute;
    bottom: 3rem;
    right: 3rem;
    z-index: 20;
    display: flex;
    gap: 10px;
}

.nav-arrow {
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.nav-arrow:hover {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
}

.hero-indicators {
    position: absolute;
    right: 3rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hero-indicator {
    width: 4px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    transition: all 0.3s;
    cursor: pointer;
}

.hero-indicator.active {
    height: 40px;
    background: var(--primary);
    box-shadow: 0 0 10px rgba(245, 165, 36, 0.6);
}

/* Mobile Adaptation */
@media (max-width: 768px) {
    .hero-featured-slide {
        height: 520px;
        border-radius: 24px;
    }

    .hero-featured-content {
        padding: 1.75rem 1.5rem 1.25rem;
        justify-content: flex-end;
        background: linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 30%, transparent 80%);
    }

    .hero-tags {
        display: flex;
        margin-bottom: 0.5rem;
    }

    .status-badge-hero {
        display: none;
    }

    .hero-description {
        font-size: 0.85rem;
        -webkit-line-clamp: 3;
        margin-bottom: 1rem;
    }

    .hero-nav-btn {
        display: none;
    }

    .hero-indicators {
        right: 1.25rem;
        top: auto;
        bottom: 20rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }
    
    .btn-hero-primary, .btn-hero-secondary {
        width: 100%;
        justify-content: center;
        padding: 10px 20px;
    }
}

.img-loading-container img.loaded {
    opacity: 1;
}

/* Loader Animation (Diamond Spinner) */
.loader-spinner {
    position: absolute;
    width: 24px;
    height: 24px;
    background-color: #38bdf8;
    transform: rotate(45deg);
    animation: diamond-spin 1.5s infinite ease-in-out;
    z-index: 1;
}

@keyframes diamond-spin {
    0% { transform: rotate(45deg) scale(0.8); opacity: 0.5; }
    50% { transform: rotate(225deg) scale(1.2); opacity: 1; }
    100% { transform: rotate(405deg) scale(0.8); opacity: 0.5; }
}

/* Ocultar spinner cuando la imagen carga */
.img-loading-container.loaded .loader-spinner {
    display: none;
}

/* Centrado del spinner dentro del wrapper del detalle de serie */
.detail-cover-wrapper.img-loading-container {
    position: relative;
}
.detail-cover-wrapper.img-loading-container .loader-spinner {
    left: 50%;
    top: 50%;
    margin-left: -12px;
    margin-top: -12px;
}

/* Horizontal Scroll Container (Popular) */
.scroll-container {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding-bottom: 15px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--bg-card);
}

.scroll-container::-webkit-scrollbar {
    height: 8px;
}

.scroll-container::-webkit-scrollbar-track {
    background: var(--bg-card);
    border-radius: 4px;
}

.scroll-container::-webkit-scrollbar-thumb {
    background-color: var(--primary);
    border-radius: 4px;
}

.manga-card {
    display: none;
}

/* Popular Del Día: 5 por vista, tamaño similar a Lanzamientos */
#popular-slider {
    gap: 12px;
    padding-bottom: 2px;
    /* Ocultar scrollbar nativo para usar el personalizado */
    scrollbar-width: none;
}
#popular-slider::-webkit-scrollbar { display: none; }

#popular-slider .popular-card {
    background-color: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s;
    cursor: pointer;
    flex: 0 0 calc((100% - 4*12px)/5);
    max-width: calc((100% - 4*12px)/5);
}
#popular-slider .popular-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Updated aspect ratios */
#popular-slider .popular-cover-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4/7;
}

#popular-slider .popular-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}
#popular-slider .popular-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.25) 30%, transparent 65%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

/* Combined title styles with full text visibility */
#popular-slider .popular-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 60px; /* Increased margin for new buttons */
    padding: 0 12px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
    display: block;
    line-height: 1.2;
}

#popular-slider .popular-status-row {
    position: absolute;
    bottom: 12px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    z-index: 2; /* Ensure it's on top of overlay gradient */
}

#popular-slider .popular-icon-badge {
    background-color: rgba(30, 30, 30, 0.8);
    color: #f39c12; /* Orange color for chart icon */
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 0.9rem;
    backdrop-filter: blur(4px);
}

#popular-slider .popular-status-badge {
    font-size: 0.8rem;
    background-color: rgba(30, 30, 30, 0.8); /* Default dark bg */
    color: #ccc;
    padding: 0 10px;
    border-radius: 6px;
    font-weight: 500;
    backdrop-filter: blur(4px);
    display: block;
    line-height: 32px;
    height: 32px; /* Match icon height */
    max-width: 110px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    transition: all 0.3s ease;
}

#popular-slider .popular-status-badge.status-active {
    background-color: rgba(46, 204, 113, 0.9) !important;
    color: #fff;
    box-shadow: 0 2px 8px rgba(46, 204, 113, 0.25);
}

#popular-slider .popular-status-badge.status-finished {
    background-color: rgba(52, 152, 219, 0.9) !important;
    color: #fff;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.25);
}

#popular-slider .popular-status-badge.status-dropped {
    background-color: rgba(231, 76, 60, 0.9) !important;
    color: #fff;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.25);
}

.popular-rating-top {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(10, 10, 10, 0.85);
    color: #f1c40f;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    backdrop-filter: blur(4px);
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 4px;
    border: 1px solid rgba(241, 196, 15, 0.3);
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
    transition: transform 0.2s ease;
}

.popular-card:hover .popular-rating-top {
    transform: scale(1.05);
    border-color: rgba(241, 196, 15, 0.8);
    background: rgba(0, 0, 0, 0.95);
}

/* Legacy support removal or overwrite */
#popular-slider .popular-badge {
    display: none;
}
@media (max-width: 992px) {
    #popular-slider .popular-card {
        flex: 0 0 calc((100% - 2*12px)/3);
        max-width: calc((100% - 2*12px)/3);
    }
}

/* === SERIES RECOMMENDATIONS (INDEPENDENT) === */
#series-recommended-slider {
    gap: 12px;
    padding-bottom: 0px;
    scrollbar-width: none;
}
#series-recommended-slider::-webkit-scrollbar { display: none; }

#series-recommended-slider .popular-card {
    background-color: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s;
    cursor: pointer;
    flex: 0 0 calc((100% - 4*12px)/5);
    max-width: calc((100% - 4*12px)/5);
}
#series-recommended-slider .popular-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.series-rating-card {
    background-color: var(--bg-deep);
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.20);
    box-shadow:
        0 18px 40px -12px rgba(0, 0, 0, 0.75),
        inset 0 1px 0 rgba(255,255,255,0.03);
    padding: 1rem 1.75rem;
    position: relative;
    overflow: hidden;
    transition:
        border-color 0.3s ease,
        box-shadow 0.3s ease,
        transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}



.series-rating-card-inner {
    position: relative;
    z-index: 1;
}

.series-rating-card:hover {
    border-color: rgba(255, 145, 0, 0.65);
    box-shadow:
        0 22px 55px -10px rgba(0, 0, 0, 0.85),
        0 0 0 1px rgba(255, 145, 0, 0.35),
        0 0 22px rgba(255, 145, 0, 0.28);
    transform: translateY(-2px);
}

.series-rating-title {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
}

.series-rating-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.series-rating-summary {
    min-width: 130px;
}

.series-rating-average {
    display: inline-flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 4px;
    color: var(--primary);
    font-weight: 800;
}

.series-rating-average i {
    font-size: 0.9rem;
}

.series-rating-number {
    font-size: 1.8rem;
    line-height: 1;
}

.series-rating-max {
    font-size: 0.9rem;
    opacity: 0.8;
}

.series-rating-votes {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.series-rating-stars {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
}

.series-rating-stars .star-item {
    font-size: 1.3rem; /* antes 1.15rem */
    transition:
        transform var(--duration-fast) var(--ease-out),
        color var(--duration-fast) var(--ease-out),
        text-shadow var(--duration-fast) var(--ease-out);
}

.series-rating-stars .star-item.text-warning {
    text-shadow: 0 0 10px rgba(245, 165, 36, 0.45);
}

.series-rating-meta {
    font-size: 0.78rem;
    color: var(--text-tertiary);
}

.series-rating-user span {
    color: var(--primary);
    font-weight: 600;
}

.series-rating-stars .star-item:hover {
    transform: translateY(-2px) scale(1.15);
}

.series-rating-helper {
    font-size: 0.78rem;
    color: var(--text-tertiary);
}

#series-recommended-slider .series-cover-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 2/3; /* Shortened as requested */
}

#series-recommended-slider .series-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

#series-recommended-slider .series-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.25) 30%, transparent 65%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 15px;
}

#series-recommended-slider .series-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0; /* REMOVED extra margin */
    padding: 0 12px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
    display: block;
    line-height: 1.2;
}

#series-recommended-slider .series-status-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Ensure status classes take precedence if needed, though specific class usually wins */
#series-recommended-slider .series-status-badge.status-active { background-color: #2ecc71; }
#series-recommended-slider .series-status-badge.status-finished { background-color: #3498db; }
#series-recommended-slider .series-status-badge.status-dropped { background-color: #e74c3c; }

@media (max-width: 992px) {
    #series-recommended-slider .popular-card {
        flex: 0 0 calc((100% - 2*12px)/3);
        max-width: calc((100% - 2*12px)/3);
    }
}

.popular-scrollbar {
    height: 8px;
    background: rgba(255,255,255,0.08);
    border-radius: 6px;
    margin-top: 8px;
    position: relative;
}
.popular-scrollbar .thumb {
    position: absolute;
    height: 8px;
    background: rgba(255,255,255,0.35);
    border-radius: 6px;
    left: 0;
    top: 0;
    cursor: pointer;
}
@media (max-width: 768px) {
    #popular-slider .popular-card {
        flex: 0 0 calc((100% - 1*12px)/2);
        max-width: calc((100% - 1*12px)/2);
    }
    #series-recommended-slider .popular-card {
        flex: 0 0 calc((100% - 1*12px)/2);
        max-width: calc((100% - 1*12px)/2);
    }

    #series-recommended-slider .series-title{
        font-size: 0.9rem !important;
    }

    .series-title{
        font-size: 0.8rem !important;
    }
}
/* Latest Updates Grid */
.updates-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    justify-items: center;
}

/* Chapters View */
.chapter-feed {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
@media (max-width: 768px) {
    .chapter-feed {
        grid-template-columns: 1fr;
    }
}
.chapter-feed-card {
    background: rgba(0, 0, 0, 0.6);
    border-radius: 14px;
    padding: 18px;
    overflow: hidden;

    /* CONTORNO */
    border: 3px solid rgba(255, 255, 255, 0.12);

    box-shadow:
        0 14px 34px rgba(0, 0, 0, 0.8);

    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.25s ease;
}



/* Hover */
.chapter-feed-card:hover {
    border-color: rgba(255, 145, 0, 0.45);
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.9);
    transform: translateY(-2px);
}


.chapter-feed-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.chapter-feed-header.clickable {
    cursor: pointer;
}

.chapter-feed-cover {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    object-fit: cover;
    object-position: center;
}
.chapter-feed-cover-wrap {
    width: 52px;
    height: 64px;
    border-radius: 14px;
    background-color: #0f141d;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.chapter-feed-body {
    display: grid;
    gap: 8px;
    min-height: 86px;
}
.chapter-feed .chapter-list-item {
    border-radius: 10px;
    padding: 8px 10px !important;
    height: 39px;
    box-sizing: border-box;
}
.chapter-feed .chapter-title {
    font-size: 14px !important;
}
.chapter-feed .chapter-author {
    display: none !important;
}
.chapter-feed .chapter-date {
    font-size: 13px !important;
    margin-right: 4px !important;
}
.chapter-feed .badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
}

.chapter-feed-item-wrapper {
    min-width: 0;
    flex: 1;
}

.chapter-feed-info {
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.chapter-feed-series-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 0;
    max-width: 90%;
    display: block;
}

/* Pagination */
.pagination-bar {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.page-btn {
    background: rgba(255,255,255,0.06);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 4px 10px;
    min-width: 32px;
    text-align: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
}
.page-btn.active {
    background-color: var(--primary);
    color: #000;
    border-color: var(--primary);
}
.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#chapters-summary {
    color: var(--text-main) !important;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.2px;
}

/* Responsive breakpoints for the grid */
@media (max-width: 1200px) {
    .updates-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
@media (max-width: 992px) {
    .updates-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 768px) {
    .updates-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 220px 160px;
    }
    .hero-item-left {
        grid-column: 1 / span 2;
        grid-row: 1;
    }
    .hero-item-top {
        grid-column: 1;
        grid-row: 2;
    }
    .hero-item-bottom {
        grid-column: 2;
        grid-row: 2;
    }

    .detail-cover-wrapper {
        width: 86vw;
        height: calc(86vw * 1.5);
        border-radius: 16px;
        overflow: hidden;
        margin: 0 auto;
        display: block;
    }
    .detail-cover {
        width: 100% !important;
        height: 100% !important;
        max-width: none !important;
        object-fit: cover !important;
        border-radius: inherit !important;
        display: block !important;
    }

}
@media (max-width: 480px) {
    .updates-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .update-cover-wrapper {
        aspect-ratio: 5/8; /* More elongated for mobile */
    }

    .chapter-btn div:first-child {
        font-size: 0.7rem; /* Chapter title */
    }

    .chapter-btn div:last-child {
        font-size: 0.5rem; /* Time/Date */
    }
}

.update-card {
    background-color: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    transition: transform 0.2s;
    width: 100%;
    /* max-width removed to fill grid column */
    margin: 0 auto;
}

.update-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.update-cover-wrapper {
    position: relative;
    height: auto;
    width: 100%;
    aspect-ratio: 4/7;
}

.update-cover {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    object-position: center top;
}

.chapters-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    width: 100%;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4px 4px;
    box-sizing: border-box;
}

.chapter-btn {
    background-color: rgba(15, 15, 15, 0.85); /* Darker, more transparent to stand out less */
    backdrop-filter: blur(8px);
    color: #ddd; /* Softer white */
    border: 1px solid rgba(255,255,255,0.08); /* More subtle border */
    padding: 0;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
    text-align: center;
    height: 50px; /* Taller (more "width" visually in vertical space) */
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.chapter-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(255,255,255,0.2);
    background-color: rgba(25, 25, 25, 0.9);
}

/* Make single chapter span full width */
.chapter-btn:only-child {
    grid-column: span 2;
}

/* TOP PART: Title */
.chapter-top {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0 5px;
    background: transparent;
}

.chapter-number {
    font-weight: 600; /* Less bold */
    font-size: 0.8rem; /* Smaller text */
    color: #eee;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

/* BOTTOM PART: Time / Badge */
.chapter-bottom {
    width: 100%;
    font-size: 0.7rem; /* Smaller text */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 2px 0;
    font-weight: 400; /* Lighter weight */
}

/* Style for NEW chapters (Red bottom bar) */
.chapter-bottom.is-new {
    background-color: rgba(220, 53, 69, 0.25);
    color: #ff6b6b;
    border-top: 1px solid rgba(220, 53, 69, 0.4);
}

/* Style for OLD chapters (Grey bottom bar) */
.chapter-bottom:not(.is-new) {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ccc;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.update-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.25) 30%, transparent 65%);
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    --overlay-bottom-gap: 60px;
    padding-bottom: var(--overlay-bottom-gap);
}

.update-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0;
    padding: 0 15px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    text-align: center;
}

/* Detail View Styles */
.detail-container {
    padding: 2rem 0;
}

/* Contenedor principal de pestañas (detalle) */
.bg-card {
    background-color: var(--bg-deep) !important;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.65),
        inset 0 1px 0 rgba(255,255,255,0.03);
    transition:
        box-shadow 0.25s ease,
        border-color 0.25s ease,
        transform 0.25s ease;
}

/* Hover */
.bg-card:hover {
    border-color: rgba(255, 145, 0, 0.65);
    box-shadow:
        0 22px 55px rgba(0, 0, 0, 0.85),
        0 0 0 1px rgba(255, 145, 0, 0.35),
        0 0 20px rgba(255, 145, 0, 0.28);
    transform: translateY(-2px);
}


/* Enhanced Detail Cards System */
.series-info-card,
.author-card {
    background-color: var(--bg-deep);
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow:
        0 18px 40px -12px rgba(0, 0, 0, 0.75),
        inset 0 1px 0 rgba(255,255,255,0.03);
    transition:
        border-color 0.3s ease,
        box-shadow 0.3s ease,
        transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
    position: relative;
}

/* Hover */
.series-info-card:hover,
.author-card:hover {
    border-color: rgba(255, 145, 0, 0.65);
    box-shadow:
        0 22px 55px -10px rgba(0, 0, 0, 0.85),
        0 0 0 1px rgba(255, 145, 0, 0.35),
        0 0 22px rgba(255, 145, 0, 0.28);
    transform: translateY(-2px);
}


/* Card Specifics */
.series-info-card {
    width: 100%;
    z-index: 2;
}

.author-card {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Add accent strip to author card */
.author-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, var(--primary), transparent);
    opacity: 0.8;
}

.detail-cover-wrapper {
    position: relative;
    perspective: 1000px;
    text-align: center;
    width: min(340px, 100%);
    aspect-ratio: 2 / 3;
    border-radius: 20px;
    overflow: hidden;
    margin: 0 auto;
}

.detail-cover {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    opacity: 0;
    transition: opacity .4s ease-in-out;
    object-fit: cover;
}

.detail-cover.loaded {
    opacity: 1;
}

.detail-title {
    font-weight: 700;
    margin-top: 1rem;
    font-size: 1.5rem;
    line-height: 1.2;
    color: #fff;
    text-wrap: balance; /* Modern CSS for balanced text */
    word-wrap: break-word;
    hyphens: auto;
}



.detail-stats {
    display: flex;
    gap: 20px;
    margin: 1rem 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 1.5rem;
}

.btn-read {
    background-color: var(--primary);
    color: #000;
    font-weight: 700;
    padding: 10px 25px;
    border-radius: 30px;
    border: none;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.btn-follow {
    background-color: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-main);
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.btn-follow:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(245, 165, 36, 0.1);
}

/* Updated Tabs Style */
.detail-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 0;
    margin: 0;
    width: 100%;
    overflow: visible;
}
.detail-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 15px;
    font-weight: 600;
    position: relative;
    transition: all 0.3s;
}

.detail-tabs .nav-item {
    width: 100%;
    min-width: 0;
}
.detail-tabs .nav-link {
    background: transparent;
    border: none;
    color: var(--text-muted) !important;
    font-size: 1rem;
    padding: 8px 20px;
    border-radius: 50px !important; /* Force pill shape */
    transition: all 0.3s;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =========================================
   INFO VIEW STYLES
   ========================================= */
.info-card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 1px solid var(--border-subtle) !important;
}

.info-card-hover:hover {
    transform: translateY(-5px);
    border-color: var(--primary) !important;
    box-shadow: 0 10px 25px rgba(245, 165, 36, 0.2);
}

.info-card-hover .card-body i {
    transition: transform 0.3s ease, text-shadow 0.3s ease;
}

.info-card-hover:hover .card-body i {
    transform: scale(1.15);
    text-shadow: 0 0 15px var(--primary-glow);
}

/* JIN Card Specific Hover */
.jin-card-hover {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    cursor: default;
}

.jin-card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(234, 179, 8, 0.3) !important;
}

.jin-card-hover .fa-coins {
    transition: transform 0.5s ease;
}

.jin-card-hover:hover .fa-coins {
    transform: scale(1.2) rotate(10deg);
}

.jin-card-hover button {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.jin-card-hover button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(234, 179, 8, 0.6) !important;
}

.detail-tab-btn.active {
    color: var(--primary);
}

.detail-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary);
}

/* --- Modal Improvements --- */

/* Text Colors */
.text-white-50 {
    color: rgba(255, 255, 255, 0.5) !important;
}
.text-light-grey {
    color: #b0b3b8 !important;
}

/* Modal Content Styling */
.modal-content.bg-dark-card {
    background-color: #1a1f2c; /* Slightly lighter dark */
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* JIN Packages Cards */
.jin-package-card {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.jin-package-card:hover {
    background-color: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: 0 5px 15px rgba(245, 165, 36, 0.1);
}

.jin-package-card.selected {
    border-color: var(--primary);
    background-color: rgba(245, 165, 36, 0.1);
}

/* Welcome Gift Card */
.welcome-gift-card {
    background: linear-gradient(135deg, rgba(245, 165, 36, 0.1) 0%, rgba(255, 107, 129, 0.1) 100%);
    border: 1px solid rgba(245, 165, 36, 0.3);
    border-radius: 12px;
}

/* Lock Icon Glow */
.lock-icon-glow {
    text-shadow: 0 0 20px rgba(245, 165, 36, 0.5);
    animation: lock-pulse 2s infinite;
}

@keyframes lock-pulse {
    0% { transform: scale(1); text-shadow: 0 0 20px rgba(245, 165, 36, 0.5); }
    50% { transform: scale(1.05); text-shadow: 0 0 30px rgba(245, 165, 36, 0.8); }
    100% { transform: scale(1); text-shadow: 0 0 20px rgba(245, 165, 36, 0.5); }
}

/* Unlock Input/Message Box */
.unlock-message-box {
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    position: relative;
    margin-top: 15px;
}

/* Modal Animation */
.modal.fade .modal-dialog {
    transform: scale(0.95);
    transition: transform 0.3s ease-out;
}
.modal.show .modal-dialog {
    transform: scale(1);
}

.detail-tabs .nav-link.active {
    background-color: var(--primary) !important;
    color: #000 !important;
    font-weight: 600;
}
.detail-tabs .nav-link:hover:not(.active) {
    background-color: rgba(255,255,255,0.05);
    color: #fff !important;
}

/* Locked Chapter Visuals */
@keyframes lockPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.locked-icon-anim {
    animation: lockPulse 2s infinite ease-in-out;
}

.chapter-locked-card {
    position: relative;
    opacity: 0.85;
    background-color: rgba(20, 20, 20, 0.6); /* Sombreado */
    transition: all 0.3s ease;
    overflow: hidden;
}

.chapter-locked-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4); /* Overlay oscuro */
    z-index: 1;
    pointer-events: none; /* Permitir clic en el elemento padre */
}

.chapter-locked-card:hover {
    opacity: 1;
    background-color: rgba(30, 30, 30, 0.8);
}

.lock-animation-icon {
    font-size: 1.2rem;
    color: #f5a524; /* Primary color */
    animation: lock-pulse 2s infinite;
    z-index: 2;
    position: relative;
    text-shadow: 0 0 10px rgba(245, 165, 36, 0.5);
}

@keyframes lock-pulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

.premium-price-badge {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
    position: relative;
}

/* Mobile: fila de 3 con scroll horizontal si desborda */
@media (max-width: 768px) {
    .detail-tabs {
        grid-template-columns: repeat(3, minmax(140px, 1fr));
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 12px; /* separa la barra de scroll de los tabs */
    }
    .detail-tabs .nav-item {
        min-width: 0;
    }
}

@media (max-width: 768px) {
    /* Reducir tamaño del título h5 en la tarjeta de capítulos */
    .bg-card h5 {
        font-size: 0.95rem !important;
    }
    .detail-synopsis .mb-3 {
        margin-bottom: 6px !important;
    }
    .detail-synopsis .row {
        --bs-gutter-y: .25rem;
    }
    .detail-synopsis h5 {
        margin-bottom: 8px !important;
    }
    .detail-synopsis p {
        margin-bottom: 10px !important;
    }
}

/* Upcoming pill base style (used in updates overlay) */
.upcoming-pill {
    background: rgba(15, 15, 15, 0.65);
    height: 50px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 4px 6px rgba(0,0,0,0.25);
    color: #fff;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 85%;
    margin: 0 auto;
    backdrop-filter: blur(3px);
}

/* Read Chapter Indicator */
.chapter-list-item.chapter-read {
    background-color: rgba(30, 30, 30, 0.4) !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
    transition: all 0.2s ease;
}

.chapter-list-item.chapter-read .chapter-title {
    color: #9ca3af !important; /* Cool gray */
}

.chapter-list-item.chapter-read .chapter-date,
.chapter-list-item.chapter-read .chapter-author,
.chapter-list-item.chapter-read i {
    color: #6b7280 !important;
}

/* Change the orange dot to grey for read chapters */
.chapter-list-item.chapter-read > div:first-child > div:first-child {
    background-color: #4b5563 !important;
    box-shadow: none !important;
}

.chapter-list-item.chapter-read:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
}
.chapter-list-item.chapter-read:hover .chapter-title {
    color: #d1d5db !important;
}

/* Read styles for Latest Chapters buttons (matching Details view) */
#updates-grid .chapter-btn.chapter-read {
    background-color: rgba(30, 30, 30, 0.4) !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
    transition: all 0.2s ease;
}

#updates-grid .chapter-btn.chapter-read .chapter-number {
    color: #9ca3af !important; /* Cool gray */
}

#updates-grid .chapter-btn.chapter-read .chapter-bottom {
    color: #6b7280 !important;
}

#updates-grid .chapter-btn.chapter-read i {
    color: #6b7280 !important;
}

#updates-grid .chapter-btn.chapter-read:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
} 

/* Mobile tuning for updates overlay */
@media (max-width: 768px) {
    .update-title {
        font-size: 0.9rem;
        margin-bottom: 32px;
        line-height: 1.2;
        display: -webkit-box;
        -webkit-line-clamp: 3; /* Max 2 lines */
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .upcoming-pill {
        height: 36px;
        width: 80%;
        font-size: 0.70rem;
        backdrop-filter: blur(6px);
    }

    .text-white{
        font-size: 1.1rem;
    }

    .text-accent{
        font-size: 0.9rem;
    }

    .btn-primary{
        font-size: 0.8rem !important;
    }

    .btn-notif-off{
        font-size: 0.8rem !important;
        padding: 5px 12px !important;
    }
   
    /* Compactar botones de capítulos en móvil */
    .chapters-container {
        gap: 3px;
        padding: 3px 4px;
    }
    .chapter-btn {
        height: 36px;
        border-radius: 6px;
    }
    .chapter-top {
        min-height: 20px;
        padding: 0 4px;
    }
    .chapter-number {
        font-size: 0.62rem;
    }
    .chapter-bottom {
        font-size: 0.62rem;
        gap: 4px;
        padding: 1px 0;
    }
}

/* Chapter List Container - Grid System */
.chapter-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

/* 2 Columns for Laptop/PC */
@media (min-width: 992px) {
    .chapter-list {
        grid-template-columns: 1fr 1fr;
    }
}

.chapter-list .empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem 0;
    color: #fff;
    font-size: 1.05rem;
}

/* Compact Chapter List Item */
.chapter-list-item {
    border: 1px solid var(--border-color);
    /* Ultra compact padding */
    padding: 12px 12px !important;
    border-radius: 50px; /* Fully rounded pill */
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: auto;
    width: 100%; /* Ensure it fills grid cell */
    box-sizing: border-box; /* Prevent padding from adding to width */
    overflow: hidden; /* Prevent content overflow */

    transition: background-color 0.2s ease,
                border-color 0.2s ease,
                transform 0.15s ease;
}

.chapter-list-item:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
}

/* Left side text container override */
.chapter-list-item .d-flex.flex-column {
    line-height: 1 !important;
    gap: 0 !important; /* Ensure no flex gap */
    justify-content: center;
}

/* Title: "Capítulo X" */
.chapter-title {
    font-size: 14px !important; /* +1px from 13px */
    line-height: 1 !important;
    margin-bottom: 2px !important;
    font-weight: 500 !important;
}

/* Author: "Por X" */
.chapter-author {
    font-size: 13px !important; /* +1px from 12px */
    line-height: 1 !important;
    display: block;
}

/* Date/Right side text */
.chapter-date {
    font-size: 13px !important; /* +1px from 12px */
    line-height: 1 !important;
    margin-right: 8px !important; /* Move date away from right edge */
}

/* Dot spacing reduction */
.chapter-list-item .d-flex.gap-3 {
    gap: 0.8rem !important; /* Increased gap to move text right */
}

/* Remove default Bootstrap margins if any persist */
.chapter-list-item p, 
.chapter-list-item span, 
.chapter-list-item div {
    margin-block-start: 0;
    margin-block-end: 0;
}

/* Chapter Search Bar */
.chapter-search-bar {
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    overflow: hidden;
}
.chapter-search-bar .input-group-text {
    background-color: transparent;
    border: none;
    color: var(--text-muted);
}
.chapter-search-input {
    background-color: transparent !important;
    border: none !important;
    color: #fff !important;
}
.chapter-search-input::placeholder {
    color: var(--text-muted);
}
.chapter-clear-search {
    background-color: transparent;
    border: none;
    color: var(--text-muted);
}
.chapter-clear-search:hover {
    color: var(--primary);
}
.chapter-search-bar:focus-within {
    border-color: var(--border-color);
    box-shadow: none;
}
.chapter-search-bar .form-control:focus,
.chapter-search-bar .btn:focus,
.chapter-search-bar .input-group-text:focus {
    box-shadow: none !important;
    outline: none !important;
}
.chapter-search-bar .btn {
    border: none !important;
}

/* Footer */
footer {
    background-color: #05070a;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
}

/* Skeletons */
.skeleton {
    position: relative;
    overflow: hidden;
    background-color: #1a202c;
    border-radius: 12px;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.2);
}
.skeleton::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    transform: translateX(-100%);
    background: linear-gradient(
        110deg, 
        transparent 30%, 
        rgba(255, 255, 255, 0.05) 45%, 
        rgba(255, 255, 255, 0.08) 50%, 
        rgba(255, 255, 255, 0.05) 55%, 
        transparent 70%
    );
    animation: skeleton-shimmer 2s infinite;
    will-change: transform;
}
@keyframes skeleton-shimmer {
    100% { transform: translateX(100%); }
}

.skeleton-line {
    height: 14px;
    border-radius: 6px;
    background-color: #1e293b;
    margin: 6px auto;
    position: relative;
    overflow: hidden;
}
.skeleton-line::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
    animation: skeleton-shimmer 2s infinite;
}

.skeleton-pill {
    height: 36px;
    border-radius: 18px;
    background-color: #1e293b;
    position: relative;
    overflow: hidden;
}
.skeleton-pill::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
    animation: skeleton-shimmer 2s infinite;
}

/* Skeleton Card Specifics */
.skeleton-card {
    background-color: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    height: 100%;
    width: 100%;
    border: 1px solid rgba(255,255,255,0.03);
}
.skeleton-cover {
    width: 100%;
    height: 100%;
    background-color: #0f1319;
    position: relative;
    overflow: hidden;
}

.detail-cover-skeleton {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 5;
}

.skeleton-cover::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    transform: translateX(-100%);
    background: linear-gradient(
        110deg, 
        transparent 30%, 
        rgba(255, 255, 255, 0.03) 45%, 
        rgba(255, 255, 255, 0.06) 50%, 
        rgba(255, 255, 255, 0.03) 55%, 
        transparent 70%
    );
    animation: skeleton-shimmer 2s infinite;
}

.series-rating-skeleton-desktop {
    display: block;
}

.series-rating-skeleton-mobile {
    display: none;
}

.skeleton-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0; top: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 16px;
    background: linear-gradient(to top, rgba(10,14,23,0.98) 0%, rgba(10,14,23,0.5) 60%, transparent 100%);
    z-index: 2;
}
.skeleton-center-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    width: 42px;
    height: 42px;
    background: transparent;
    border: 2px solid var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--primary), inset 0 0 10px var(--primary);
    animation: pulse-neon 2s infinite ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}
.skeleton-center-icon::after {
    content: "";
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 12px #fff;
    opacity: 0.9;
}

@keyframes pulse-neon {
    0% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.6; box-shadow: 0 0 10px var(--primary), inset 0 0 5px var(--primary); }
    50% { transform: translate(-50%, -50%) scale(1.05); opacity: 1; box-shadow: 0 0 25px var(--primary), inset 0 0 15px var(--primary); }
    100% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.6; box-shadow: 0 0 10px var(--primary), inset 0 0 5px var(--primary); }
}

/* --- SERIES VIEW STYLES --- */

.series-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}
@media (max-width: 1200px) { .series-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 992px) { .series-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) { .series-grid { grid-template-columns: repeat(2, 1fr); } }

/* Series Card */
.series-card {
    background-color: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
}
.series-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}
.series-cover-wrapper {
    position: relative;
    aspect-ratio: 4/7;
    overflow: hidden;
}
.series-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.series-card:hover .series-cover {
    transform: scale(1.05);
}
.series-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0; top: 0;
    background: linear-gradient(to top, rgba(10,14,23,0.95) 0%, rgba(10,14,23,0.6) 30%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 12px;
}
.series-title {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    line-height: 1.3;
    white-space: normal;
}
.series-status-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.status-active { background-color: #2ecc71; color: #fff; }
.status-finished { background-color: #3498db; color: #fff; }
.status-dropped { background-color: #e74c3c; color: #fff; }

@media (max-width: 768px) {
    .series-status-badge {
        font-size: 0.5rem;
        padding: 3px 10px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    #series-recommended-slider .series-status-badge {
        font-size: 0.5rem;
        padding: 2px 6px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

.series-chapter-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    color: #ddd;
    font-size: 0.8rem;
    padding: 8px 0;
    border-radius: 6px;
    text-align: center;
    width: 100%;
    backdrop-filter: blur(4px);
    font-weight: 600;
    transition: background 0.2s;
}
.series-chapter-btn:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

/* Filter Modal - Offcanvas Style (Right to Left Slide) */
.filter-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 99999; /* Ensure it's above everything including navbar */
    opacity: 0;
    transition: opacity 0.25s ease;
    display: block;
}

.filter-modal-overlay.active {
    opacity: 1;
}

.filter-modal-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 450px; /* Wider as requested */
    height: 100%;
    background: #000000;
    box-shadow: -10px 0 40px rgba(245, 165, 36, 0.2);
    padding: 30px;
    overflow-y: auto;
    border-left: 3px solid var(--primary); /* Orange contour/border */
    transform: translateX(100%);
    transition: transform 0.25s ease-out;
    border-radius: 0;
}

.filter-modal-overlay.active .filter-modal-content {
    transform: translateX(0);
}

/* Enhanced Filter Styling (Black Theme) */
.filter-modal-content h5 {
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #fff;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 15px;
    margin-bottom: 25px !important;
}

#close-filter-btn {
    opacity: 0.7;
    transition: opacity 0.2s;
}
#close-filter-btn:hover {
    opacity: 1;
    color: #fff;
    transform: scale(1.1);
}

.filter-option-btn {
    background: #0a0a0a;
    border: 1px solid #222;
    color: #888;
    padding: 6px 14px;
    border-radius: 6px;
    transition: all 0.2s;
    font-weight: 500;
}
.filter-option-btn:hover {
    background: #111;
    border-color: #444;
    color: #ccc;
}
.filter-option-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #000;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(245, 165, 36, 0.2);
}

.custom-radio label {
    background: #0a0a0a;
    border: 1px solid #222;
    color: #888;
}
.custom-radio input:checked + label {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
    font-weight: 700;
}

#filter-owner-select {
    background-color: #0a0a0a !important;
    border-color: #222;
    color: #ccc;
    padding: 10px;
}
#filter-owner-select:focus {
    border-color: var(--primary);
    box-shadow: none;
}

#apply-filter-btn {
    width: 100%;
    padding: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 8px;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(245, 165, 36, 0.2);
}

@media (max-width: 768px) {
    .filter-modal-content {
        max-width: 90%;
        padding: 20px;
        /* Ensure content has enough space from top edge */
        padding-top: 40px; 
    }
    
    /* Force maximum z-index on mobile to ensure it covers the navbar */
    .filter-modal-overlay {
        z-index: 2147483647 !important; /* Max integer value */
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        height: 100vh !important;
    }
    
    /* Ensure content is strictly positioned */
    #series-filter-modal {
        z-index: 2147483647 !important;
    }

    .filter-modal-content .mb-4 {
        margin-bottom: 0.75rem !important;
    }
    .filter-modal-content .mb-3 {
        margin-bottom: 0.5rem !important;
    }
    .filter-title {
        margin-bottom: 6px;
        font-size: 0.75rem;
    }
    .custom-radio label {
        padding: 5px 8px;
        width: auto;
        min-width: 60px;
        font-size: 0.75rem;
    }
    .filter-option-btn {
        padding: 5px 8px;
        font-size: 0.7rem;
    }
    .genre-grid {
        gap: 6px;
        grid-template-columns: repeat(3, 1fr);
    }
    .filter-modal-content h5 {
        font-size: 1rem;
        margin-bottom: 0.75rem !important;
        margin-top: 10px;
    }
    .filter-modal-content .d-flex.gap-3 {
        gap: 3px !important;
    }
    #apply-filter-btn {
        padding: 10px 24px;
        font-size: 0.85rem;
        width: 100%;
    }
}

.filter-title {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}
.genre-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.filter-option-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #2c3e50;
    color: var(--text-muted);
    padding: 8px 12px;
    border-radius: 8px;
    text-align: center;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}
.filter-option-btn:hover {
    border-color: var(--primary);
    color: #fff;
    background: rgba(245, 165, 36, 0.1);
}
.filter-option-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #000;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(245, 165, 36, 0.3);
}

/* Custom Radio for Type */
.custom-radio {
    position: relative;
    padding-left: 0;
}
.custom-radio input {
    display: none;
}
.custom-radio label {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #2c3e50;
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100px;
    text-align: center;
    font-weight: 500;
}
.custom-radio label:hover {
    border-color: var(--primary);
    color: #fff;
    background: rgba(245, 165, 36, 0.1);
}
.custom-radio input:checked + label {
    background: var(--primary);
    border-color: var(--primary);
    color: #000;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(245, 165, 36, 0.3);
}

/* Override Bootstrap Primary Button */
.btn-primary {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #000 !important;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 24px;
    border-radius: 50px;
    transition: all 0.3s ease;
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: #e6951b !important;
    border-color: #e6951b !important;
    color: #000 !important;
    box-shadow: 0 4px 15px rgba(245, 165, 36, 0.3) !important;
    transform: translateY(-1px);
}

.btn-danger {
    background-color: #f5a623 !important; /* ámbar */
    border-color: #f5a623 !important;
    color: #111 !important;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-danger:hover,
.btn-danger:focus,
.btn-danger:active {
    background-color: #ffb84d !important;
    border-color: #ffb84d !important;
    box-shadow: 0 4px 15px rgba(245, 166, 35, 0.35) !important;
    transform: translateY(-1px);
}

/* Notifications Toggle: fixed size and custom colors (no red/orange) */
.notif-toggle-btn {
    display: inline-block;
    width: 120px;
    min-width: 120px;
    padding: 6px 12px;
    border-radius: 999px !important;
    font-weight: 600;
    font-size: 0.82rem;
    text-align: center;
    transition: transform .1s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
}
.btn-notif-on {
    background-color: #22c55e !important; /* emerald green */
    border-color: #22c55e !important;
    color: #0b1a0f !important;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}
.btn-notif-on:hover, .btn-notif-on:focus {
    background-color: #19b24f !important;
    border-color: #19b24f !important;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18);
}
.btn-notif-off {
    background-color: #1f2937 !important; /* slate/charcoal */
    border: 1.5px solid #38bdf8 !important; /* cyan accent */
    color: #e5e7eb !important; /* light text */
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.10);
}
.btn-notif-off:hover, .btn-notif-off:focus {
    background-color: #111827 !important;
    border-color: #22d3ee !important;
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.18);
}

#close-filter-btn {
    transition: all 0.2s;
}
#close-filter-btn:hover {
    color: #ef4444;
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

#series-scrollbar {
    margin-bottom: 3rem;
    margin-top: 8px;
}

/* SEARCH MODAL STYLES */
.search-input-group {
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 5px;
}
.search-input-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(245, 165, 36, 0.2);
}

.search-result-item {
    transition: background-color 0.2s;
    border: 1px solid transparent;
    border-radius: 8px;
    margin-bottom: 8px;
}
.search-result-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--border-color);
}
.search-result-img {
    width: 50px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
}
.search-badge {
    font-size: 0.65rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.series-type-badge {
    position: absolute;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
    color: #fff; /* Ensure text is white */
}

.badge-pos-top-left {
    top: 8px;
    left: 8px;
}

.badge-pos-top-right {
    top: 8px;
    right: 8px;
}

 .detail-stat-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    padding: 2px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.75rem;
    font-weight: 500;
    color: #fff;
 }

.type-inline-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.1;
    min-width: 64px;
}

.status-inline-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.1;
    min-width: 64px;
}

.detail-genres-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Badge Colors (Styled like star-badge) */
.badge-manhua {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 4px 10px;
    border-radius: 8px;

    /* Fondo negro translúcido + capa gris */
    background:
        linear-gradient(
            rgba(0, 0, 0, 0.68),
            rgba(0, 0, 0, 0.68)
        ),
        rgba(93, 109, 126, 0.12);

    border: 1px solid rgba(184, 32, 226, 0.28);

    color: #c941c9;
    font-weight: 700;

    box-shadow:
        0 4px 14px rgba(0, 0, 0, 0.45),
        0 0 12px rgba(93, 109, 126, 0.12),
        inset 0 0 0 1px rgba(93, 109, 126, 0.18);

    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.badge-manhwa {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 4px 10px;
    border-radius: 8px;

    /* Fondo negro un poco más oscuro */
    background:
        linear-gradient(
            rgba(0, 0, 0, 0.68),
            rgba(0, 0, 0, 0.68)
        ),
        rgba(243, 156, 18, 0.10);

    border: 1px solid rgba(243, 156, 18, 0.25);

    color: #f39c12;
    font-weight: 700;

    box-shadow:
        0 4px 14px rgba(0, 0, 0, 0.45),
        0 0 14px rgba(243, 156, 18, 0.08),
        inset 0 0 0 1px rgba(243, 156, 18, 0.15);

    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.badge-manga {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 4px 10px;
    border-radius: 8px;

    background:
        linear-gradient(
            rgba(0, 0, 0, 0.68),
            rgba(0, 0, 0, 0.68)
        ),
        rgba(39, 174, 96, 0.12);

    border: 1px solid rgba(39, 174, 96, 0.28);

    color: #27ae60;
    font-weight: 700;

    box-shadow:
        0 4px 14px rgba(0, 0, 0, 0.45),
        0 0 12px rgba(39, 174, 96, 0.10),
        inset 0 0 0 1px rgba(39, 174, 96, 0.18);

    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.badge-novela {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 4px 10px;
    border-radius: 8px;

    background:
        linear-gradient(
            rgba(0, 0, 0, 0.68),
            rgba(0, 0, 0, 0.68)
        ),
        rgba(52, 152, 219, 0.12);

    border: 1px solid rgba(52, 152, 219, 0.28);

    color: #3498db;
    font-weight: 700;

    box-shadow:
        0 4px 14px rgba(0, 0, 0, 0.45),
        0 0 12px rgba(52, 152, 219, 0.10),
        inset 0 0 0 1px rgba(52, 152, 219, 0.18);

    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.2);
}


/* RANKINGS VIEW */
.rankings-grid {
    display: flex;
    gap: 12px;
    padding-bottom: 4px;
    overflow-x: auto;
    scrollbar-width: none;
}
.rankings-grid::-webkit-scrollbar { display: none; }

#rankings-scrollbar {
    margin-top: 6px;
    margin-bottom: 28px;
}

.ranking-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 12px;

    /* Base oscura profunda */
    background: linear-gradient(
        180deg,
        #1f2633 0%,
        #171c26 100%
    );

    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;

    /* Contorno épico sutil */
    border: 1px solid rgba(255, 255, 255, 0.06);

    /* Profundidad */
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);

    transition:
        transform 220ms ease,
        box-shadow 220ms ease,
        border-color 220ms ease;

    flex: 0 0 calc((100% - 4 * 12px) / 5);
    max-width: calc((100% - 4 * 12px) / 5);
}


.ranking-card:hover {
    transform: translateY(-5px);
    z-index: 2;
    background-color: #252d3d; /* Lighter on hover */
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.ranking-cover-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4/7;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0.8rem;
}

.ranking-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ranking-card:hover .ranking-cover {
    transform: scale(1.05);
}

.ranking-info {
    padding: 0 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem; /* Increased gap for spacing */
}

.ranking-stats-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: #999;
}

.ranking-position {
    color: var(--primary);
    font-weight: 700;
}

.ranking-separator {
    height: 1px;
    background: rgba(255, 255, 255, 0.15);
    margin: 4px -0.6rem;
    width: calc(100% + 1.2rem);
}

.ranking-title2 {
    text-align: center;
    font-size: 0.95rem;
    -webkit-line-clamp: 3;
    font-weight: 700;
    line-height: 1.4;
    color: rgb(255, 255, 255);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Rank 1-3 Styles (Optional fancy effects) */
.ranking-card[data-rank="1"] .ranking-position { color: #FFD700; }
.ranking-card[data-rank="2"] .ranking-position { color: #C0C0C0; }
.ranking-card[data-rank="3"] .ranking-position { color: #CD7F32; }

/* Responsive Card width for horizontal scroll */
@media (max-width: 1200px) {
    .ranking-card {
        flex: 0 0 calc((100% - 3*12px)/4);
        max-width: calc((100% - 3*12px)/4);
    }
}
@media (max-width: 992px) {
    .ranking-card {
        flex: 0 0 calc((100% - 2*12px)/3);
        max-width: calc((100% - 2*12px)/3);
    }
}
@media (max-width: 576px) {
    .rankings-grid {
        gap: 8px;
    }
    .ranking-card {
        flex: 0 0 calc((100% - 1*8px)/2);
        max-width: calc((100% - 1*8px)/2);
    }
    .ranking-title2 {
        font-size: 0.85rem;
    }
}

/* Filter Buttons */
.ranking-filter-btn {
    transition: all 0.2s;
    min-width: 80px;
}
.ranking-filter-btn.active {
    font-weight: bold;
}

@media (max-width: 768px) {
    .ranking-filter-btn {
        min-width: auto;
        padding: 0.25rem 0.5rem;
    }
    .ranking-filter-btn i {
        font-size: 0.85rem;
    }
}

/* AUTH STYLES */
.user-avatar-wrapper {
    width: 50px;
    height: 50px;
    cursor: pointer;
}
.user-avatar-circle {
    width: 100%;
    height: 100%;
    background-color: rgba(245, 165, 36, 0.15); /* Transparent Orange */
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 1.4rem;
}

/* Modals */
.bg-dark-card {
    background-color: var(--bg-card) !important;
}
.bg-dark-input {
    background-color: #0f1218 !important;
    border-color: #2c3e50 !important;
    color: #fff !important;
}
.bg-dark-input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 0.25rem rgba(245, 165, 36, 0.25) !important;
}
.text-small {
    font-size: 0.85rem;
}
.cursor-pointer {
    cursor: pointer;
}
.hover-bg-dark:hover {
    background-color: rgba(255,255,255,0.05);
}

/* --- ENHANCED AUTH MODAL DESIGNS --- */
#authLoginModal .modal-content,
#authRegisterModal .modal-content,
#authForgotModal .modal-content,
#authChangePasswordModal .modal-content {
    background-color: #1a202c !important;
    background: linear-gradient(145deg, #1e2532, #151a25) !important;
    border: 1px solid rgba(245, 165, 36, 0.2) !important;
    border-radius: 24px !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6) !important;
    overflow: hidden; /* Ensure children don't overflow rounded corners */
}

/* Improved Text Visibility */
#authLoginModal .text-muted,
#authRegisterModal .text-muted,
#authForgotModal .text-muted,
#authChangePasswordModal .text-muted {
    color: #cfd7e6 !important; /* Much lighter, readable grey */
}

/* Professional Input Styling */
#authLoginModal .input-group,
#authRegisterModal .input-group,
#authForgotModal .input-group,
#authChangePasswordModal .input-group {
    background: #0f1218;
    border-radius: 12px;
    border: 1px solid #2c3e50;
    transition: all 0.3s ease;
    margin-bottom: 1.25rem !important; /* More breathing room */
}

#authLoginModal .input-group:focus-within,
#authRegisterModal .input-group:focus-within,
#authForgotModal .input-group:focus-within,
#authChangePasswordModal .input-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(245, 165, 36, 0.15);
}

#authLoginModal .input-group-text,
#authRegisterModal .input-group-text,
#authForgotModal .input-group-text,
#authChangePasswordModal .input-group-text {
    background: transparent !important;
    border: none !important;
    color: var(--primary) !important;
    padding-left: 20px;
    padding-right: 10px;
}

#authLoginModal .form-control,
#authRegisterModal .form-control,
#authForgotModal .form-control,
#authChangePasswordModal .form-control {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    color: #fff !important;
    padding: 12px 10px 12px 0;
}

#authLoginModal .form-control::placeholder,
#authRegisterModal .form-control::placeholder,
#authForgotModal .form-control::placeholder,
#authChangePasswordModal .form-control::placeholder {
    color: #6c757d;
    opacity: 1;
}

/* Button Enhancements */
#authLoginModal .btn-warning,
#authRegisterModal .btn-warning,
#authForgotModal .btn-warning,
#authChangePasswordModal .btn-warning {
    padding: 12px;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    border-radius: 50px !important;
    box-shadow: 0 4px 15px rgba(245, 165, 36, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
}

#authLoginModal .btn-warning:hover,
#authRegisterModal .btn-warning:hover,
#authForgotModal .btn-warning:hover,
#authChangePasswordModal .btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 165, 36, 0.4);
}

#authLoginModal .btn-outline-light,
#authRegisterModal .btn-outline-light,
#authForgotModal .btn-outline-light,
#authChangePasswordModal .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.2);
    color: #e2e8f0;
}

#authLoginModal .btn-outline-light:hover,
#authRegisterModal .btn-outline-light:hover,
#authForgotModal .btn-outline-light:hover,
#authChangePasswordModal .btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: #fff;
    color: #fff;
}

.adult-badge {
    position: absolute;
    top: 10px;
    right: 10px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 4px 10px;
    min-height: 20px;

    background: linear-gradient(135deg, #dc3545, #b02a37);
    color: #fff;

    border-radius: 999px; /* estilo pill */
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;

    z-index: 3;
    box-shadow:
        0 4px 10px rgba(220, 53, 69, 0.35),
        0 1px 2px rgba(0, 0, 0, 0.25);

    backdrop-filter: blur(2px);
    user-select: none;
}

.adult-badge.top-left {
    right: auto;
    left: 8px;
}

/* Red 'Nuevo' pill for menu items */
.menu-new-pill{
    display:inline-block;
    margin-left:8px;
    padding:2px 10px;
    border-radius:999px;
    background:#ef4444;
    color:#fff;
    font-size:0.7rem;
    font-weight:700;
    vertical-align:middle;
}

/* My Reports Read Indicator */
.my-report-card {
    position: relative;
}
.report-read-indicator{
    position:absolute;
    left:24px;
    bottom:10px;
    width:auto;
    height:28px;
    border-radius:999px;
    padding:4px 10px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:6px;
    border:1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06);
}

/* =========================================
   NOTIFICATION VISIBILITY RULES
   ========================================= */
@media (min-width: 998.9px) {
    .nav-notification-desktop {
        display: block !important;
    }
    .menu-notification-mobile {
        display: none !important;
    }
}

@media (max-width: 998.8px) {
    .nav-notification-desktop {
        display: none !important;
    }
    .menu-notification-mobile {
        display: inline-block !important;
        width: 100%;
    }
}
.report-read-indicator.read{
    color:#22c55e;
    border-color: rgba(34,197,94,0.35);
    box-shadow: 0 0 0 3px rgba(34,197,94,0.12);
}
.report-read-indicator.unread{
    color:#ef4444;
    border-color: rgba(239,68,68,0.35);
    box-shadow: 0 0 0 3px rgba(239,68,68,0.12);
}
.adult-badge.small {
    font-size: 0.6rem;
    padding: 1px 6px;
}

/* --- NEW RANKING STYLES --- */
.ranking-badge {
    position: absolute;
    top: -4px;
    left: 10px;
    background: var(--bg-panel);
    color: var(--text-main);
    font-weight: 800;
    padding: 8px 10px 10px;
    border-radius: 0 0 4px 4px;
    z-index: 10;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
    border-top: none;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    clip-path: polygon(0 0, 100% 0, 100% 85%, 50% 100%, 0 85%);
    min-width: 40px;
    text-align: center;
}

.ranking-type-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 9;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.ranking-type-badge.type-manhua { color: #d66fd6; border-color: rgba(214, 111, 214, 0.4); }
.ranking-type-badge.type-manhwa { color: #f5b041; border-color: rgba(245, 176, 65, 0.4); }
.ranking-type-badge.type-manga { color: #58d68d; border-color: rgba(88, 214, 141, 0.4); }
.ranking-type-badge.type-novela { color: #5dade2; border-color: rgba(93, 173, 226, 0.4); }

.ranking-card[data-rank="1"] .ranking-badge { 
    background: linear-gradient(180deg, #FFD700, #FDB931);
    color: #3e2704;
    text-shadow: none;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
    border: none;
}
.ranking-card[data-rank="2"] .ranking-badge { 
    background: linear-gradient(180deg, #E0E0E0, #BDBDBD);
    color: #2b2b2b;
    text-shadow: none;
    border: none;
}
.ranking-card[data-rank="3"] .ranking-badge { 
    background: linear-gradient(180deg, #CD7F32, #A0522D);
    color: #3e1d04;
    text-shadow: none;
    border: none;
}

.ranking-stats-line {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #aaa;
}
.stat-item i { font-size: 0.7rem; }
.stat-item.star-item { color: #f1c40f; }
.stat-item.view-item { color: #bdc3c7; }

.ranking-info {
    padding: 0 0.8rem 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.ranking-card {
    border-radius: 16px;
    background: linear-gradient(165deg, #1f2633 0%, #12151c 100%);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.ranking-card:hover {
    box-shadow: 0 12px 32px rgba(0,0,0,0.5), 0 0 0 1px rgba(245, 165, 36, 0.3);
    background: linear-gradient(165deg, #252d3d 0%, #171c26 100%);
}

.ranking-footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto; /* Push footer to bottom */
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.223);
}

.ranking-status-text {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.status-ongoing-text { color: #2ecc71; }
.status-completed-text { color: #3498db; }
.status-paused-text { color: #f39c12; }
.status-cancelled-text { color: #e74c3c; }
.status-dropped-text { color: #95a5a6; }

/* Mobile adjustments for Ranking Cards */
@media (max-width: 768px) {
    .ranking-title2 {
        font-size: 0.8rem; /* Smaller font for mobile */
        line-height: 1.2;
        display: -webkit-box;
        -webkit-line-clamp: 2; /* Max 2 lines */
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        margin-top: 0.2rem;
        height: auto;
    }
}

.adult-inline-badge {
    display: inline-block;
    background-color: #dc3545;
    color: #fff;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.6rem;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #ef4444, #b91c1c);
}


#adultContentModal .modal-content {
    background: linear-gradient(145deg, #1a202c, #0f141d) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 12px 32px rgba(0,0,0,0.55) !important;
}
#adultContentModal .badge.bg-danger {
    background-color: #dc3545 !important;
    box-shadow: 0 0 20px rgba(220, 53, 69, 0.6) !important;
    animation: glowPulse 1.6s infinite alternate;
}
@keyframes glowPulse {
    0% { box-shadow: 0 0 10px rgba(220, 53, 69, 0.35); }
    100% { box-shadow: 0 0 24px rgba(220, 53, 69, 0.75); }
}

/* Toast progress bar */
.toast-progress {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 4px;
    width: 0%;
    background-color: #00dc82;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
    transition: width linear;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

#liveToast {
    position: relative;
    overflow: hidden;
}

#adultContentModal .tech-danger-modal {
    position: relative;
    overflow: hidden;
}

#adultContentModal .tech-danger-modal::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(220,53,69,0.9), transparent);
    opacity: 0.8;
}
#adultContentModal .danger-title h5 {
    color: #fff;
    letter-spacing: 0.5px;
}
#adultContentModal .danger-card {
    background: linear-gradient(145deg, rgba(20,20,24,0.95), rgba(10,10,14,0.92));
    border: 1px solid rgba(220,53,69,0.45);
    box-shadow: 0 0 24px rgba(220,53,69,0.18), inset 0 0 12px rgba(220,53,69,0.08);
}
#adultContentModal .danger-icon {
    color: #dc3545;
    filter: drop-shadow(0 0 10px rgba(220,53,69,0.6));
}
#adultContentModal .form-check-input:checked {
    background-color: #dc3545;
    border-color: #dc3545;
    box-shadow: 0 0 10px rgba(220,53,69,0.5);
}
#adultContentModal .btn-danger-neon {
    background: linear-gradient(145deg, #8b0000, #dc3545);
    border: 1px solid rgba(255,255,255,0.08);
    color: #fff;
    box-shadow: 0 10px 24px rgba(220,53,69,0.35), 0 0 12px rgba(220,53,69,0.45) inset;
}
#adultContentModal .btn-danger-neon:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(220,53,69,0.45), 0 0 14px rgba(220,53,69,0.55) inset;
}

/* Report Modal */
.report-modal {
	background: #0b0b0e !important;
	border-radius: 12px;
	border: 1px solid rgba(245,65,65,0.45) !important;
	box-shadow:
		0 0 0 1px rgba(245,65,65,0.45),
		0 0 26px rgba(245,65,65,0.4),
		0 18px 40px rgba(0,0,0,0.7) !important;
	position: relative;
	overflow: hidden;
	min-height: 380px;
}
.report-modal::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	pointer-events: none;
	box-shadow: 0 0 40px rgba(245,65,65,0.55);
	opacity: 0.45;
}
.report-modal .modal-body > .mb-3,
.report-modal .modal-body > .mb-2 {
    margin-bottom: 1rem !important;
}
#reportModal .modal-dialog {
    max-width: 640px;
}
@media (min-width: 992px) {
    #reportModal .modal-dialog {
        max-width: 720px;
    }
}
.report-icon {
	width: 40px;
	height: 40px;
	border-radius: 8px;
	background: rgba(34,10,14,1);
	border: 1px solid rgba(245,65,65,0.35);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #f54242;
	box-shadow: 0 4px 10px rgba(0,0,0,0.35);
	font-size: 16px;
}
@media (max-width: 576px) {
	.report-modal .report-icon {
		width: 100px;
		height: 50px;
		border-radius: 10px;
	}
}
.report-modal .form-label {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.65);
    letter-spacing: 0.3px;
    margin-bottom: 6px;
    text-transform: none;
}
.report-modal .form-select,
.report-modal .form-control {
	background-color: #0f1115 !important;
	border: 1px solid rgba(245,65,65,0.25) !important;
	color: #ffffff !important;
	border-radius: 10px !important;
}
.report-modal .form-select:focus,
.report-modal .form-control:focus {
	border-color: rgba(245,65,65,0.7) !important;
	box-shadow: 0 0 0 3px rgba(245,65,65,0.18) !important;
	background-color: #121317 !important;
}
.report-modal .form-control::placeholder {
	color: rgba(255,255,255,0.65) !important;
	opacity: 1;
}
#report-description.report-textarea {
	min-height: 160px;
}
#report-char-count {
	font-size: 0.75rem;
	color: rgba(255,255,255,0.45);
}

.report-modal #btn-send-report {
	background: linear-gradient(135deg, #00c48c, #00e0a1);
	border-color: #00d68f;
	color: #000;
	border-radius: 10px;
	font-weight: 700;
	box-shadow: 0 10px 24px rgba(0,214,143,0.35);
}
.report-modal #btn-send-report:hover {
	background: linear-gradient(135deg, #00e0a1, #00f0ae);
	border-color: #00f0ae;
	color: #000;
	box-shadow: 0 12px 28px rgba(0,214,143,0.5);
}

/* Chapter header alignment */
.chapter-header {
    padding: 0 1rem;
}

/* Report state badges (dashboard-style reuse) */
.badge.bg-success, .badge.bg-danger, .badge.bg-warning {
    font-weight: 600;
    letter-spacing: .2px;
}

/* My Reports cards */
.report-reply-icon {
    box-shadow: 0 4px 10px rgba(0,0,0,0.35);
}
/* Enhanced My Reports UI */
.my-report-card {
    background: linear-gradient(145deg, #0b0b0e, #12141a);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.45);
    position: relative;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    padding: 20px !important;
    padding-bottom: 30px !important;
}
.my-report-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 40px rgba(0,0,0,0.6), 0 0 0 1px rgba(245, 165, 36, 0.3);
    border-color: rgba(245, 165, 36, 0.5);
}
.extra-small {
    font-size: 0.75rem;
}

.label-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 220, 200, 0.12);
    border: 1px solid rgba(0, 220, 200, 0.35);
    color: #00dcd0;
    border-radius: 999px;
    padding: 4px 10px;
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: .5px;
}
.badge-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(245,165,36,0.12);
    border: 1px solid rgba(245,165,36,0.35);
    color: var(--primary);
    border-radius: 999px;
    padding: 6px 12px;
    font-weight: 700;
    letter-spacing: .3px;
}
.badge-btn.compact {
    padding: 5px 14px;
    font-size: 0.9rem;
}
.badge-btn:hover {
    background: rgba(245,165,36,0.2);
    color: #fff;
}
.related-item {
    background: #0b0b0e;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    transition: transform .15s ease, box-shadow .2s ease, background .15s ease;
    margin-bottom: 24px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04), 0 6px 14px rgba(0,0,0,0.35);
}
.related-item:hover {
    transform: translateY(-1px);
    background: linear-gradient(145deg, #0b0b0e, #14161b);
    box-shadow: 0 6px 20px rgba(0,0,0,0.35);
    border-color: rgba(255,255,255,0.14);
}
.related-badge {
    display: inline-block;
    margin: 0 0 6px 0;
    background: rgba(138,162,201,0.16);
    border: 1px solid rgba(138,162,201,0.34);
    color: #8aa2c9;
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
}
.related-title {
    color: #e6e8ee;
    font-weight: 600;
    white-space: normal;
    overflow: visible;
    min-width: 0;
}
.related-open-icon {
    color: #8aa2c9;
}
/* Fixed cover size for related items */
.related-cover {
    width: 60px;
    height: 80px;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

.time-badge {
    position: absolute;
    right: 18px;
    bottom: 12px;
    background: rgba(77,163,255,0.12);
    border: 1px solid rgba(77,163,255,0.35);
    color: #4da3ff;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.75rem;
    box-shadow: 0 4px 14px rgba(77,163,255,0.12);
}
.close-pill {
    position: absolute;
    right: 10px;
    top: 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    color: #ddd;
    border-radius: 10px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease, transform .15s ease;
}
.close-pill:hover {
    background: rgba(255,255,255,0.12);
    transform: scale(1.03);
}
.clickable { cursor: pointer; }
.bg-dark-subtle {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
}
/* Report Details Modal */
.report-details-modal {
    box-shadow: 0 12px 30px rgba(0,0,0,0.6);
    position: relative;
    overflow: hidden;
    min-height: 560px;
}
.report-details-modal .rdm-header {
    background-color: #20070c;
    border-bottom: none;
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
    padding: 18px 22px;
}
.rdm-title {
    font-weight: 700;
    color: #fff;
}
.rdm-date {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.75);
}
.report-details-modal .rdm-close {
    position: relative;
    width: 0.8rem;
    height: 0.8rem;
    margin-left: 12px;
    filter: invert(1);
}


.report-details-modal .rdm-body {
    background-color: #0b0b0e;
}
.report-details-modal .modal-dialog {
    max-width: 780px;
}

.rdm-series-card {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    padding: 12px 14px;
}
.rdm-series-cover {
    width: 50px;
    height: 60px;
    background-size: cover;
    background-position: center;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}
.rdm-series-title {
    color: #e6e8ee;
    font-weight: 600;
    white-space: normal;
    overflow: visible;
    min-width: 0;
}
.rdm-field-box {
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.16);
    color: #ddd;
}
.details-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(30,24,16,1);
    border: 1px solid rgba(245,165,36,0.35);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    box-shadow: 0 4px 10px rgba(0,0,0,0.35);
    font-size: 16px;
}
.status-resolved {
    background: rgba(0, 200, 120, 0.15);
    border: 1px solid rgba(0, 200, 120, 0.4);
    color: #00c878;
    border-radius: 10px;
    padding: 6px 10px;
    font-weight: 700;
    margin-right: 10px;
}
.detail-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: rgba(255,255,255,0.55);
    font-weight: 700;
    margin-bottom: 6px;
}
.detail-value {
    color: #fff;
    font-weight: 600;
}
.detail-box {
    background: #0f1115;
    border: 1px solid rgba(255,255,255,0.12);
    color: #ddd;
    border-radius: 10px;
    padding: 12px;
}
.staff-response-highlight {
    border: 1px solid rgba(245,165,36,0.35);
    color: var(--primary);
    border-radius: 12px;
    padding: 12px;
}
@media (max-width: 399.99px) {
	#signup-promo-register,
	#signup-promo-login {
		font-size: 0.75rem;
		padding: 0.4rem 0.9rem;
	}

	.ranking-stats-line {
		font-size: 0.65rem;
	}

    .status-inline-badge{
        font-size: 0.70rem !important;
    }

    .popular-title {
        margin-bottom: 50px !important;
        font-size: 0.9rem !important;
    }

    .section-title {
        font-size: 1.2rem !important;
    }

	.badge-btn.compact {
		font-size: 0.8rem;
		padding: 4px 10px;
	}

	.related-badge {
		font-size: 0.65rem;
		padding: 3px 8px;
		white-space: nowrap;
	}

	.related-title {
		font-size: 0.88rem;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 3;
		overflow: hidden;
		text-overflow: ellipsis;
	}
}

/* =========================================
   MODERN SETTINGS VIEW STYLES
   ========================================= */

.settings-card {
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.8);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

.settings-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.8;
}

.settings-card:hover {
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.5);
}

.settings-section-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.settings-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin-left: 1rem;
}

/* Custom Input Styles */
.form-control-custom {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    padding: 12px 16px !important;
    color: #fff !important;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.form-control-custom:focus {
    background-color: rgba(255, 255, 255, 0.08) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(245, 165, 36, 0.15) !important;
}

.form-control-custom::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.input-group-text {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-right: none !important;
    border-radius: 12px 0 0 12px !important;
    color: var(--text-muted) !important;
}

.input-group .form-control-custom {
    border-left: none !important;
    border-radius: 0 12px 12px 0 !important;
    padding-left: 0 !important;
}

/* Avatar Upload Wrapper */
.avatar-upload-wrapper {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.05);
    padding: 4px;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.avatar-upload-wrapper:hover {
    border-color: var(--primary);
    transform: scale(1.05);
}

#settings-avatar-preview {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.avatar-upload-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
    border-radius: 50%;
}

.avatar-upload-wrapper:hover .avatar-upload-overlay {
    opacity: 1;
}

/* Modern Buttons */
#settings-avatar-upload-btn, 
#settings-name-submit, 
#settings-email-submit {
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: none;
}

#settings-avatar-upload-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    box-shadow: none;
    font-size: 0.9rem;
}

#settings-avatar-upload-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: translateY(-2px);
}

#settings-name-submit, 
#settings-email-submit {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    box-shadow: none;
}

#settings-name-submit:hover, 
#settings-email-submit:hover {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 15px rgba(245, 165, 36, 0.3);
}

/* Labels */
.settings-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 500;
}



/* Navbar */
.navbar-custom {
    background-color: var(--bg-main);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
}

.mobile-nav {
    width: 100%;
    margin-top: 6px;
}
.mobile-menu {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    align-items: center;
    width: 100%;
    list-style: none;
    padding: 0;
    margin: 0;
}

@media (max-width: 992px) {
    .navbar-custom {
        padding: 0.75rem 1rem;
    }
    .navbar-brand {
        display: none !important;
    }
    .navbar .container-fluid {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    .mobile-menu {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0;
        width: 100%;
        padding: 0 4px;
    }
    .mobile-item {
        font-size: 0.75rem;
        padding: 8px 10px;
        width: auto;
        flex-shrink: 0;
    }
    .mobile-item i {
        font-size: 1rem;
        transform: translateY(2px);
    }
    .mobile-item span {
        margin-top: 3px;
    }
    .mobile-item.active span {
        display: inline-block;
    }
    
    /* MODALS MOBILE OPTIMIZATION */
    /* Login & Register Modals - Compact Mobile Sizing */
    #authLoginModal .modal-dialog,
    #authRegisterModal .modal-dialog {
        max-width: 85% !important;
        margin: 1.5rem auto !important;
    }
    
    #authLoginModal .modal-content,
    #authRegisterModal .modal-content {
        border-radius: 16px;
    }

    #authLoginModal .modal-body,
    #authRegisterModal .modal-body {
        padding: 1.5rem 1rem !important;
    }

    /* Scale down internal elements for Auth Modals */
    #authLoginModal h3, #authRegisterModal h3 { font-size: 1.25rem !important; }
    #authLoginModal p, #authRegisterModal p { font-size: 0.8rem !important; margin-bottom: 1rem !important; }
    
    #authLoginModal .input-group-text, #authLoginModal .form-control,
    #authRegisterModal .input-group-text, #authRegisterModal .form-control {
        font-size: 0.85rem !important;
        padding: 0.4rem 0.6rem !important;
        height: auto !important;
    }
    
    #authLoginModal .btn, #authRegisterModal .btn {
        font-size: 0.9rem !important;
        padding: 0.4rem 0.5rem !important;
    }
    
    /* User Menu Modal - Compact Mobile Sizing (approx 25% of desktop feel / intermediate) */
    #userMenuDialog {
        max-width: 280px !important; /* Fixed narrow width */
        width: 75% !important;       /* Fallback percentage */
        margin: 10vh auto !important; /* Center vertically with offset */
        position: relative !important; /* Override fixed positioning */
        top: auto !important;
        left: auto !important;
        transform: none !important;
    }
    
    #userMenuDialog .modal-content {
        border: 1px solid rgba(255,255,255,0.1) !important;
        box-shadow: 0 10px 25px rgba(0,0,0,0.5) !important;
    }
    
    #userMenuDialog .modal-body {
        padding: 1rem !important;
    }
    
    /* Adjust text sizes in User Menu */
    #menu-user-name { font-size: 0.95rem !important; }
    #menu-user-email { font-size: 0.75rem !important; }
    #userMenuDialog .btn { font-size: 0.85rem !important; padding: 0.4rem 0.5rem !important; }
}

/* User Avatar & Menu */
.user-avatar-wrapper {
    cursor: pointer;
    position: relative;
}
.user-avatar-circle {
    border-radius: 50%;
    background-color: rgba(245, 165, 36, 0.15); /* Transparent Orange */
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
}
.user-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    /* Universal style for both desktop and mobile as requested */
    width: 50px;
    height: 50px;
    background-color: #1a202c; /* Dark blue/black matching modal/card */
    border-radius: 50%;
    color: #fff; /* White icon */
    transition: background-color 0.2s;
}

.user-icon:hover {
    background-color: #2d3748;
}
/* Hero Carousel */
.hero-carousel {
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}
.hero-slide {
    height: 400px; /* Desktop Height */
    position: relative;
}
.hero-img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    filter: brightness(0.7);
}
.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(10,14,23,0.95), transparent);
    padding: 2rem;
}
.hero-badge {
    background-color: var(--primary);
    color: #000;
    padding: 4px 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    display: inline-block;
}
.hero-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}
.hero-meta {
    font-size: 0.9rem;
    color: #cbd5e1;
    margin-bottom: 1rem;
}
.hero-desc {
    font-size: 0.95rem;
    color: #a0a0a0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 600px;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .hero-slide {
        height: 250px;
    }
    .popular-title {
        margin-bottom: 50px !important;
        font-size: 0.9rem !important;
        -webkit-line-clamp: 3 !important;
        word-wrap: break-word;
        display: -webkit-box !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        line-height: 1.2;
    }
    .hero-title {
        font-size: 1.25rem;
    }
    .hero-desc {
        display: none;
    }
    .hero-overlay {
        padding: 1rem;
    }
}

/* Card Styles */
.bg-dark-card {
    background-color: var(--bg-card);
}
.bg-dark-input {
    background-color: #0a0e17;
    border-color: var(--border-color);
}
.text-warning {
    color: var(--primary) !important;
}
.btn-warning {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #000;
}
.btn-warning:hover {
    background-color: #d98e1d;
    border-color: #d98e1d;
    color: #000;
}

.toast-container {
    z-index: 10000 !important;
}

.toast {
    background-color: #1a202c !important;
    background: linear-gradient(145deg, #1e2532, #151a25) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
    overflow: hidden;
    min-width: 300px;
}

.toast .toast-body {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    font-size: 0.95rem;
}

.toast .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.8;
}

.toast.bg-success {
    background: linear-gradient(145deg, #1e2532, #151a25) !important; /* Override bootstrap bg */
    border-left: 4px solid #10b981 !important;
}
.toast.bg-danger {
    background: linear-gradient(145deg, #1e2532, #151a25) !important;
    border-left: 4px solid #ef4444 !important;
}
.toast.bg-primary, .toast.bg-info {
    background: linear-gradient(145deg, #1e2532, #151a25) !important;
    border-left: 4px solid #3b82f6 !important;
}

/* Icons */
.toast-icon {
    font-size: 1.2rem;
    margin-right: 12px;
}
.toast.bg-success .toast-icon { color: #10b981; }
.toast.bg-danger .toast-icon { color: #ef4444; }
.toast.bg-primary .toast-icon, .toast.bg-info .toast-icon { color: #3b82f6; }

/* Mobile Modal Alignment (Pending Task) */
@media (max-width: 768px) {
    #userMenuModal .modal-dialog {
        margin-right: 10px;
        margin-left: auto;
    }
}


@media (max-width: 992px) {
    #userMenuDialog {
        margin-right: 15px !important;
        margin-left: auto !important;
        max-width: 260px !important;
        position: fixed !important;
        right: 0 !important;
        left: auto !important;  
    }

    #userMenuModal {
        z-index: 1055 !important;
    }
}

/* Locked Chapter Card Design - Modernized & Compact */
.locked-chapter-card {
    background: linear-gradient(145deg, rgba(30, 30, 40, 0.9), rgba(20, 20, 30, 0.95));
    border: 1px solid rgba(245, 165, 36, 0.3);
    border-radius: 50px; /* Fully rounded pill to match normal chapters */
    padding: 12px 12px !important; /* Match normal chapter padding */
    margin-bottom: 0; /* Let grid gap handle spacing */
    width: 100%;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

/* Left strip removed to match the oval shape perfectly */

.locked-chapter-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), 0 0 8px rgba(245, 165, 36, 0.1);
}

.locked-card-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
    width: 100%;
}

.lock-icon-circle {
    width: 32px; /* Reduced size to fit compact height */
    height: 32px;
    background: rgba(245, 165, 36, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.locked-chapter-card:hover .lock-icon-circle {
    transform: scale(1.1) rotate(-10deg);
    background: var(--primary);
    color: #000;
}

.locked-title {
    font-weight: 600;
    color: #fff;
    font-size: 14px !important; /* Match chapter-title */
    line-height: 1 !important;
    margin-bottom: 2px;
}

.locked-meta {
    font-size: 13px !important; /* Match chapter-author */
    color: rgba(255, 255, 255, 0.5);
    line-height: 1 !important;
}

.cost-pill {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    color: #fff;
    font-size: 0.85rem;
}

.unlock-btn-fake {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.locked-chapter-card:hover .unlock-btn-fake {
    opacity: 1;
    transform: translateX(0);
}

/* Mobile responsive - Fix for locked card looking too "wide"/tall */
@media (max-width: 576px) {
    .locked-card-content {
        flex-direction: row; /* Keep row layout */
        align-items: center;
        gap: 10px;
    }
    
    .unlock-btn-fake {
        display: none; /* Hide text button on mobile to save space */
    }
    
    .locked-title
    .chapter-title {
        font-size: 13px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 140px;
    }
    
    .locked-meta,
    .chapter-author {
        font-size: 10px !important;
    }

    .chapter-date{
        font-size: 12px !important;
    }
    
    .cost-pill {
        padding: 3px 10px;
        font-size: 0.8rem;
    }
}



@keyframes spin {
    to { transform: rotate(360deg); }
}


/* Ranking Table (Page) */
.ranking-table-header {
    display: grid;
    grid-template-columns: 60px 1fr 100px 100px;
    padding: 15px 20px;
    background: rgba(255,255,255,0.03);
    border-radius: 12px 12px 0 0;
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
}
.ranking-row {
    display: grid;
    grid-template-columns: 60px 1fr 100px 100px;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    align-items: center;
    transition: background 0.2s;
}
.ranking-row:hover {
    background: rgba(255,255,255,0.02);
}
.ranking-row:last-child {
    border-bottom: none;
}
.rank-num {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--text-muted);
}
.rank-num.top-1 { color: #ffd700; text-shadow: 0 0 10px rgba(255,215,0,0.3); }
.rank-num.top-2 { color: #c0c0c0; }
.rank-num.top-3 { color: #cd7f32; }

/* Global Ranking UI */
.ranking-floating-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.6); /* Semi-transparent dark background */
    color: #fff;
    padding: 8px 16px; /* Smaller padding */
    border-radius: 50px;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 1040;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(5px);
    animation: btnPulse 3s infinite ease-in-out; /* Animación suave usando color de marca */
}

@keyframes btnPulse {
	0%, 100% {
		box-shadow: 0 0 10px rgba(245, 165, 36, 0.15);
		border-color: rgba(255, 255, 255, 0.12);
	}
	50% {
		box-shadow: 0 0 22px rgba(245, 165, 36, 0.45);
		border-color: rgba(245, 165, 36, 0.6);
	}
}

.ranking-floating-btn:hover {
	background: rgba(0, 0, 0, 0.8);
	transform: translateY(-2px);
	box-shadow: 0 6px 18px rgba(245, 165, 36, 0.45);
	border-color: rgba(245, 165, 36, 0.7);
}

.ranking-btn-content {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.8rem; /* Smaller text */
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ranking-icon {
    font-size: 1rem; /* Smaller icon */
    color: #ffd700; /* Yellowish color */
    filter: drop-shadow(0 0 2px rgba(255, 215, 0, 0.5)); /* Glowing border effect */
}

/* Sliding Panel */
.ranking-panel {
    position: fixed;
    top: 0;
    right: 0;
    transform: translateX(110%); /* Hardware accelerated hiding */
    width: 500px; /* Optimized width */
    height: 100vh;
    background: var(--bg-dark);
    z-index: 1050;
    box-shadow: -5px 0 30px rgba(0,0,0,0.5);
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    display: flex;
    flex-direction: column;
	border-left: 2px solid rgba(245, 165, 36, 0.7); /* Borde naranja suave */
	will-change: transform; /* Performance optimization */
	animation: borderGlow 3s infinite alternate;
}

@keyframes borderGlow {
	0% {
		box-shadow: -4px 0 18px rgba(245, 165, 36, 0.25);
		border-left-color: rgba(245, 165, 36, 0.6);
	}
	100% {
		box-shadow: -8px 0 32px rgba(245, 165, 36, 0.55);
		border-left-color: rgba(245, 165, 36, 0.95);
	}
}

.ranking-panel.open {
    transform: translateX(0); /* Hardware accelerated open */
}

.ranking-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1045;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease; /* Optimized transitions */
    backdrop-filter: blur(2px);
    will-change: opacity;
}

.ranking-overlay.active {
    opacity: 1;
    visibility: visible;
}

.ranking-header {
    padding: 20px;
    background: rgba(0,0,0,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ranking-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

/* Ranking Items - Compact & Boxy Redesign */
.ranking-list {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 10px 25px; /* Taller padding (more height) */
    background: linear-gradient(90deg, #11141a, #1a202c);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 8px; /* Spacing between items */
    will-change: transform, box-shadow;
    opacity: 0;
    animation: itemSlideIn 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes itemSlideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Special Styling for Top 1 */
.ranking-item:has(.rank-1) {
    background: linear-gradient(90deg, rgba(234, 179, 8, 0.15), rgba(0, 0, 0, 0.8)); /* Gold tint */
    border: 1px solid rgba(234, 179, 8, 0.5);
    box-shadow: 0 0 20px rgba(234, 179, 8, 0.1);
    transform: scale(1.02); /* Slightly larger */
}
.ranking-item:has(.rank-1)::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: #eab308; /* Solid Gold Bar */
    box-shadow: 0 0 10px #eab308;
}

/* Special Styling for Top 2 */
.ranking-item:has(.rank-2) {
    background: linear-gradient(90deg, rgba(229, 231, 235, 0.1), rgba(0, 0, 0, 0.8)); /* Silver tint */
    border: 1px solid rgba(229, 231, 235, 0.3);
}
.ranking-item:has(.rank-2)::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: #e5e7eb; /* Solid Silver Bar */
}

/* Special Styling for Top 3 */
.ranking-item:has(.rank-3) {
    background: linear-gradient(90deg, rgba(249, 115, 22, 0.1), rgba(0, 0, 0, 0.8)); /* Bronze tint */
    border: 1px solid rgba(249, 115, 22, 0.3);
}
.ranking-item:has(.rank-3)::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: #f97316; /* Solid Bronze Bar */
}

/* Fallback for browsers not supporting :has() - applying via JS would be safer but CSS :has is well supported now in modern browsers. 
   If :has support is a concern, we can target via JS adding a class to the parent. 
   Assuming modern environment given the project context. 
*/

.ranking-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Rank Number - Small Rounded Square */
.ranking-number {
    width: 22px;
    height: 22px;
    min-width: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 10px;
    color: #888;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px; /* rounded-lg */
    margin-right: 8px; /* Closer to avatar */
}

/* Top 3 Rank Colors */
.ranking-number.rank-1 { background: linear-gradient(135deg, #facc15, #ca8a04); color: #fff; box-shadow: 0 0 10px rgba(250, 204, 21, 0.4); }
.ranking-number.rank-2 { background: linear-gradient(135deg, #e5e7eb, #9ca3af); color: #000; }
.ranking-number.rank-3 { background: linear-gradient(135deg, #fdba74, #ea580c); color: #fff; }

/* Avatar - Compact */
.ranking-avatar-wrapper {
    width: 34px;
    height: 34px;
    min-width: 34px;
    margin-right: 8px; /* Closer to name */
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.ranking-avatar-img, .ranking-avatar-initial {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ranking-avatar-initial {
    background: var(--primary);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

/* Name - Small & Tight */
.ranking-user-name {
    flex: 1;
    text-align: left;
    font-weight: 700;
    color: #e0e0e0;
    font-size: 11px; /* Smaller text */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 10px;
}

/* Hours Badge - Compact Pill */
.ranking-hours-badge {
    background: rgba(234, 179, 8, 0.1); /* Yellow-ish tint */
    color: #eab308; /* Yellow-500 */
    padding: 2px 8px;
    border-radius: 9999px;
    font-weight: 800;
    font-size: 9px; /* Tiny text */
    display: flex;
    align-items: center;
    gap: 4px;
    border: 1px solid rgba(234, 179, 8, 0.2);
}

.ranking-hours-badge i {
    font-size: 8px;
}

/* Header Styles - Refined */
.ranking-header {
    padding: 24px;
    background: linear-gradient(to bottom, #000000, #111111); /* Pure Black Gradient */
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center; /* Center vertically */
}

.header-left-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ranking-icon-container {
	width: 48px;
	height: 48px;
	background-color: rgba(245, 165, 36, 0.12); /* Fondo suave basado en var(--primary) */
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #ffd700; /* Icono dorado para trofeo */
	font-size: 1.2rem;
	box-shadow: 0 4px 12px rgba(245, 165, 36, 0.25);
}

.ranking-header-content {
    display: flex;
    flex-direction: column;
    justify-content: center; /* Center content vertically */
    gap: 0; /* Remove gap completely */
    height: 48px; /* Match icon height to ensure alignment */
}

.ranking-title {
    font-weight: 900;
    letter-spacing: 0.15em;
    font-size: 1.25rem; /* Restored size for better proportion */
    line-height: 1;
    color: #fff;
    text-transform: uppercase;
    margin: 0;
    transform: translateY(-2px); /* Slight optical adjustment upwards */
}

.ranking-subtitle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px; /* Small margin to separate from title */
}

.ranking-subtitle .ranking-label {
    color: #ffffff !important; /* Force Pure White */
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 1;
    text-shadow: 0 0 10px rgba(255,255,255,0.5);
}

.ranking-dot {
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background-color: rgba(245, 165, 36, 0.9);
}

.ranking-today {
	color: rgba(245, 165, 36, 0.95);
	font-size: 10px;
	font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.ranking-close-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none; /* Removed border */
    color: white; /* Darker X */
    cursor: pointer;
    transition: all 0.2s ease;
}

.ranking-close-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
}

/* End of Header Styles */

.ranking-close-btn:hover {
    border-color: #fff;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.btn-report-custom {
    background: rgba(220, 53, 69, 0.12);
    border: 1px solid rgba(220, 53, 69, 0.35);
    color: #ef4444;
    font-weight: 600;
    transition: all 0.2s ease;
}
.btn-report-custom:hover {
    background: rgba(220, 53, 69, 0.25);
    border-color: #ef4444;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

/* Media Query Updates */
@media (max-width: 576px) {
    .ranking-panel {
        width: 100%; /* Full width on mobile */
        border-left: none; /* No border needed for full screen */
        /* right: 0; Inherited from main style, crucial for transform to work */
    }

    .ranking-header {
        padding: 15px; /* Compact header padding */
    }

    .ranking-list {
        padding: 10px; /* Less side padding */
    }

    .ranking-item {
        padding: 12px 15px; /* Optimized padding for mobile */
    }

    .ranking-floating-btn {
        bottom: 30px; /* Better thumb reachability */
        right: 20px;
        padding: 12px;
        width: 48px; /* Circular touch target */
        height: 48px;
        border-radius: 50%;
        justify-content: center;
		box-shadow: 0 4px 15px rgba(245, 165, 36, 0.4); /* Glow naranja coherente */
    }

    .ranking-btn-content {
        gap: 0;
        width: 100%;
        height: 100%;
        align-items: center;
        justify-content: center; /* Centrar icono dentro del botón circular */
    }

    .ranking-btn-content span {
        display: none; /* Icon only on mobile */
    }

    .ranking-icon {
        font-size: 1.2rem; /* Larger icon */
        margin: 0;
        line-height: 1; /* Evitar desalineación vertical del ícono */
    }
}

@media (max-width: 768px) {

    .series-rating-card {
        margin-top: -0.50rem !important;
    }
}

/* Mobile Responsiveness for Rating Card */
@media (max-width: 1299.98px) {
    .series-rating-skeleton-desktop {
        display: none;
    }
    .series-rating-skeleton-mobile {
        display: block;
    }

    .series-rating-card {
        padding: 1.25rem 1.25rem;
        margin-bottom: 1rem !important;
    }
    
    .series-rating-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .series-rating-summary {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: 0.5rem;
        padding-top: 0.75rem;
        border-top: 1px solid rgba(255,255,255,0.1);
    }
    
    .series-rating-title {
        font-size: 1.1rem;
    }
    
    .series-rating-subtitle {
        display: none; /* Hide subtitle on mobile */
    }
    
    .series-rating-helper {
        display: none; /* Hide helper text on mobile */
    }
    
    .series-rating-meta {
        flex-direction: column;
        align-items: center;
        margin-top: 1rem;
        width: 100%;
    }
    
    .series-rating-user {
        font-size: 0.95rem;
        width: 100%;
        text-align: center;
        background: rgba(255,255,255,0.05);
        padding: 10px;
        border-radius: 12px;
        margin-bottom: 0.5rem;
    }

    .series-rating-stars {
        margin: 1rem 0;
        gap: 6px;
        justify-content: center;
        display: flex;
        width: 100%;
    }

    .series-rating-votes {
        font-size: 0.85rem;
    }

    
    .series-rating-stars .star-item {
        font-size: 1.2rem; /* Bigger touch targets */
        padding: 12px 2px;
    }
}

/* Universal Skeleton Background Helper */
.skeleton-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #1a202c;
    z-index: 0;
}
.skeleton-bg::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
    animation: skeleton-shimmer 2s infinite;
}

/* Image Loading States */
img.lazy-fade {
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    position: relative;
    z-index: 0;
}
img.lazy-fade.loaded {
    opacity: 1;
}
img.lazy-fade.error {
    opacity: 0;
}

/* Ensure wrappers position context */
.ranking-cover-wrapper,
.series-cover-wrapper,
.update-cover-wrapper,
.detail-cover-wrapper {
    position: relative;
    background-color: #1a202c;
    overflow: hidden;
}

.series-title-3lines {
    font-size: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    text-align: center;

    line-height: 1.3em;
    max-height: calc(1.3em * 3); /* 3 líneas */
    overflow: hidden;
}

@media (max-width: 768px) {

    /* Contenedor del overlay */
    .update-overlay {
        padding-bottom: 12px !important;
        gap: 6px;
    }

    /* Título (3 líneas controladas y mejor legibilidad) */
    .update-overlay .series-title-3lines {
        font-size: 0.95rem !important;
        line-height: 1.2;
        max-height: calc(1.2em * 3);
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        text-align: center;
    }

    /* Botón Siguiendo */
    .btn-follow-card {
        width: 80% !important;
        max-width: 220px;
        margin: 0 auto;
        font-size: 0.85rem;
        padding: 6px 12px;
        border-radius: 999px;
    }
}