: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);
}

/* Settings Banner Styles */
.settings-profile-banner {
    position: relative;
}

.settings-banner-avatar {
    transition: all var(--duration-normal) var(--ease-out);
}

.settings-banner-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.settings-banner-edit-btn {
    transition: all var(--duration-normal) var(--ease-out);
}

.settings-banner-edit-btn:hover {
    transform: scale(1.1) rotate(15deg);
    border-color: white !important;
    box-shadow: 0 0 25px rgba(255,107,157,0.8) !important;
}

.settings-banner-name {
    animation: fadeInUp 0.8s var(--ease-out);
}

.settings-banner-badge {
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.8s var(--ease-out) 0.2s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsive for Banner */
@media (max-width: 768px) {
    .settings-profile-banner {
        min-height: 320px !important;
    }
    
    .settings-banner-avatar {
        width: 100px !important;
        height: 100px !important;
    }
    
    .settings-banner-name {
        font-size: clamp(1.5rem, 8vw, 2.5rem) !important;
    }
    
    .settings-banner-badge {
        font-size: 0.5rem !important;
        padding: 0.5rem 1rem !important;
    }
    
    /* Colapsa el layout principal avatar+info a columna centrada */
    .settings-profile-banner .d-flex.align-items-center.gap-4 {
        flex-direction: column;
        align-items: center !important;
        text-align: center;
        gap: 1.5rem !important;
    }

    /* El row nombre+badge y el row icono+fecha se mantienen en fila */
    .settings-banner-name-row,
    .settings-banner-date-row {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px !important;
    }

    .settings-banner-badge {
        font-size: 0.45rem !important;
        padding: 0.3rem 0.7rem !important;
        letter-spacing: 0.1em !important;
    }
}

@media (max-width: 576px) {
    .settings-profile-banner {
        min-height: 280px !important;
    }
    
    .settings-banner-avatar {
        width: 80px !important;
        height: 80px !important;
    }
    
    .settings-banner-name {
        font-size: clamp(1.25rem, 10vw, 2rem) !important;
    }
    
    .settings-banner-edit-btn {
        width: 32px !important;
        height: 32px !important;
    }
    
    .settings-banner-edit-btn i {
        font-size: 0.75rem !important;
    }

    .settings-profile-banner .d-flex.align-items-center.gap-4 {
        gap: 1rem !important;
    }

    .settings-banner-date-row {
        font-size: 0.75rem !important;
    }
}

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

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

body {
    background-color: var(--bg-deep);
    color: var(--text-main);
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-display: swap;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

/* Optimized fixed background for performance */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    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-size: cover;
    pointer-events: none;
    /* will-change removed to prevent rendering artifacts on mobile */
}

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

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

/* ─── CARD ─── */
.store-card {
    background: #111111;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.04);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-out);
    display: flex;
    flex-direction: column;
}
.store-card:hover {
    border-color: rgba(245, 165, 36, 0.3);
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(245, 165, 36, 0.08);
}
.store-card-media {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--bg-deep);
}
.store-card-img,
.store-card-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s var(--ease-out);
}
.store-card:hover .store-card-img,
.store-card:hover .store-card-media video {
    transform: scale(1.05);
}
.store-card-category-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.2rem 0.55rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    color: var(--text-main);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.store-card-body {
    padding: 1.25rem 1.5rem 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.store-card-title {
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--text-main);
    line-height: 1.25;
}
.store-card-desc {
    font-size: 0.78rem;
    color: var(--text-tertiary);
    line-height: 1.35;
    margin-bottom: 0.3rem;
}
.store-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}
.store-card-price {
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--primary);
}
.store-card-price .jin-currency {
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-left: 2px;
}
.store-card-cta {
    padding: 0.4rem 0.9rem;
    background: rgba(245, 165, 36, 0.08);
    border: 1px solid rgba(245, 165, 36, 0.15);
    border-radius: 8px;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: all var(--duration-normal) var(--ease-out);
    cursor: pointer;
}
.store-card:hover .store-card-cta {
    background: var(--primary);
    color: var(--bg-deep);
}
.store-card-name {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-main);
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.store-card-subtitle {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.store-card-footer {
    margin-top: auto;
    padding-top: 0.4rem;
}
.store-card-price {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--primary);
}

/* ─── DETAIL MODAL OVERLAY ─── */
.store-detail-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease-out);
}
.store-detail-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* ─── DETAIL PANEL ─── */
.store-detail {
    background: #111111;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.06);
    padding: 0;
    width: 100%;
    max-width: 560px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    position: relative;
    transform: translateY(20px) scale(0.97);
    transition: transform 0.3s var(--ease-out);
    overflow: hidden;
}
.store-detail-overlay.active .store-detail {
    transform: translateY(0) scale(1);
}
.store-detail-content {
    padding: 1.75rem 2rem;
    overflow-y: auto;
    flex: 1;
}
.store-detail-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.store-detail-back:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}
.store-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}
.store-detail-title {
    font-weight: 900;
    font-size: 1.35rem;
    color: var(--text-main);
    margin: 0;
}
.store-detail-subtitle {
    font-size: 0.82rem;
    color: var(--text-tertiary);
    margin: 0.2rem 0 0;
}
.store-detail-media-card {
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(255,255,255,0.04);
}
.store-detail-media {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--bg-deep);
    display: flex;
    align-items: center;
    justify-content: center;
}
.store-detail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.store-detail-info-card {
    padding: 1.25rem;
    border-radius: 14px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
}
.store-detail-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin: 0 0 1rem 0;
}
.store-detail-divider {
    height: 1px;
    background: rgba(255,255,255,0.06);
    margin: 1rem 0;
}
.store-detail-footer-fixed {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.15rem 2rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    background: #111111;
    flex-shrink: 0;
}
.store-detail-footer-fixed small {
    font-size: 0.72rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}
.store-detail-footer-fixed .fs-5 {
    color: var(--text-main);
}
.store-detail-footer-fixed .fs-5 small {
    color: var(--text-tertiary);
    font-size: 0.7rem;
    text-transform: none;
    letter-spacing: 0;
}
.store-detail-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.store-detail-overlay.active .store-detail {
    transform: translateY(0) scale(1);
}
.store-detail-back:hover {
    border-color: var(--border-light);
    color: var(--text-main);
}
.store-detail-content {
    max-width: 560px;
    margin: 0 auto;
}
.store-detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}
.store-detail-title {
    font-weight: 800;
    font-size: 1.35rem;
    color: var(--text-main);
    margin: 0;
}
.store-detail-subtitle {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 0.2rem 0 0;
}
.store-detail-media-card {
    background: #111111;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.04);
    overflow: hidden;
    margin-bottom: 0.75rem;
}
.store-detail-media {
    position: relative;
    max-height: 360px;
    overflow: hidden;
}
.store-detail-img {
    width: 100%;
    display: block;
    object-fit: contain;
    max-height: 360px;
}
.store-detail-info-card {
    background: #111111;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.04);
    padding: 1.1rem;
}
.store-detail-desc {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.6;
    margin: 0;
}
.store-detail-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: 0.85rem 0;
}
.store-detail-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.store-detail-price small {
    font-size: 0.7rem;
}
.store-detail-btn {
    padding: 0.6rem 1.3rem;
    border-radius: 12px;
    border: none;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
}
.store-detail-btn.btn-warning {
    background: var(--primary);
    color: #000;
}
.store-detail-btn.btn-warning:hover {
    background: #e0961f;
    transform: scale(1.02);
}
.store-detail-btn.owned-btn {
    background: rgba(74, 222, 128, 0.15);
    color: var(--success);
    border: 1px solid rgba(74, 222, 128, 0.3);
    cursor: default;
}

/* ─── ANIMATIONS ─── */
@keyframes storeCardIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
.store-card {
    animation: storeCardIn 0.3s var(--ease-out) both;
}
.store-card:nth-child(1) { animation-delay: 0.02s; }
.store-card:nth-child(2) { animation-delay: 0.04s; }
.store-card:nth-child(3) { animation-delay: 0.06s; }
.store-card:nth-child(4) { animation-delay: 0.08s; }
.store-card:nth-child(5) { animation-delay: 0.10s; }
.store-card:nth-child(6) { animation-delay: 0.12s; }
.store-card:nth-child(7) { animation-delay: 0.14s; }
.store-card:nth-child(8) { animation-delay: 0.16s; }
.store-card:nth-child(9) { animation-delay: 0.18s; }
.store-card:nth-child(10) { animation-delay: 0.20s; }
.store-card:nth-child(11) { animation-delay: 0.22s; }
.store-card:nth-child(12) { animation-delay: 0.24s; }
.store-card:nth-child(13) { animation-delay: 0.26s; }
.store-card:nth-child(14) { animation-delay: 0.28s; }
.store-card:nth-child(15) { animation-delay: 0.30s; }
.store-card:nth-child(16) { animation-delay: 0.32s; }

/* ─── COIN CARDS ─────────────────────────────────────── */
.coin-card {
    position: relative;
    background: #0e0e0e;
    border-radius: 18px;
    border: 1px solid rgba(245, 165, 36, 0.08);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.35s var(--ease-out);
    display: flex;
    flex-direction: column;
    min-height: 340px;
}
.coin-card:hover {
    border-color: rgba(245, 165, 36, 0.25);
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(245, 165, 36, 0.1);
}
.coin-card-featured {
    border-color: rgba(245, 165, 36, 0.2);
    box-shadow: 0 0 30px rgba(245, 165, 36, 0.06);
}
.coin-card-featured:hover {
    border-color: rgba(245, 165, 36, 0.4);
    box-shadow: 0 0 50px rgba(245, 165, 36, 0.12);
}

/* Badge */
.coin-card-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.3rem 0.7rem;
    border-radius: 8px;
    background: rgba(245, 165, 36, 0.15);
    border: 1px solid rgba(245, 165, 36, 0.25);
    color: var(--primary);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    z-index: 2;
}
.coin-card-hot {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    background: linear-gradient(135deg, #f5a524, #e0961f);
    color: #000;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 1px;
    z-index: 2;
}

/* Glow behind coin */
.coin-card-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -60%);
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 165, 36, 0.12) 0%, transparent 70%);
    pointer-events: none;
    transition: all 0.35s var(--ease-out);
}
.coin-card:hover .coin-card-glow {
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(245, 165, 36, 0.18) 0%, transparent 70%);
}

/* Coin visual */
.coin-card-visual {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 1rem;
    position: relative;
    z-index: 1;
}
.coin-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(145deg, #d4951a, #f5a524, #d4951a);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 4px 15px rgba(245, 165, 36, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.2),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.35s var(--ease-out);
    position: relative;
}
.coin-card:hover .coin-icon {
    transform: scale(1.08) rotate(5deg);
    box-shadow:
        0 6px 25px rgba(245, 165, 36, 0.4),
        inset 0 2px 4px rgba(255, 255, 255, 0.2),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3);
}
.coin-icon-inner {
    font-size: 2rem;
    color: #5a3a00;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.15);
}
.coin-icon::after {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

/* Card info */
.coin-card-info {
    padding: 1.25rem 1.5rem 1.5rem;
    text-align: left;
    position: relative;
    z-index: 1;
}
.coin-card-name {
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 0.3rem;
}
.coin-card-price {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary);
}
.coin-card-bonus {
    display: inline-block;
    margin-top: 0.4rem;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    background: rgba(74, 222, 128, 0.12);
    color: var(--success);
    font-size: 0.75rem;
    font-weight: 700;
}
.coin-card-cta {
    margin-top: 0.7rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-tertiary);
    transition: color 0.2s;
}
.coin-card:hover .coin-card-cta {
    color: var(--text-secondary);
}

/* ─── COIN DETAIL PANEL ─── */
.coin-detail-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 0;
    margin-bottom: 1rem;
}
.coin-detail-glow {
    position: absolute;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 165, 36, 0.15) 0%, transparent 70%);
    pointer-events: none;
}
.coin-detail-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(145deg, #d4951a, #f5a524, #d4951a);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 6px 30px rgba(245, 165, 36, 0.35),
        inset 0 2px 4px rgba(255, 255, 255, 0.2),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}
.coin-detail-icon-inner {
    font-size: 2.5rem;
    color: #5a3a00;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.15);
}
.coin-detail-icon::after {
    content: '';
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.1);
}
.coin-detail-amount {
    margin-top: 1rem;
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary);
    text-shadow: 0 0 20px rgba(245, 165, 36, 0.3);
    position: relative;
    z-index: 1;
}
.coin-detail-amount span {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
}
.coin-detail-bonus {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    border-radius: 10px;
    background: rgba(74, 222, 128, 0.08);
    border: 1px solid rgba(74, 222, 128, 0.15);
    color: var(--success);
    font-size: 0.85rem;
    font-weight: 600;
    margin: 1rem 0 0 0;
}

/* Security badge */
.coin-detail-security {
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 12px;
    background: rgba(74, 222, 128, 0.05);
    border: 1px solid rgba(74, 222, 128, 0.12);
}
.coin-detail-security-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.7rem;
    border-radius: 8px;
    background: rgba(74, 222, 128, 0.15);
    color: var(--success);
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.coin-detail-security-text {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    line-height: 1.5;
    margin: 0;
}

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: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.mobile-menu::-webkit-scrollbar {
    display: none;
}
.mobile-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    min-height: 44px;
    border-radius: 999px;
    color: var(--text-main);
    background: transparent;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}
.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;
}

/* Navbar icon styling */
.nav-link i,
.btn-search i,
.user-icon i,
.nav-notification-desktop i {
    font-size: 1.15rem !important;
    -webkit-text-stroke: 0.6px currentColor;
    -webkit-text-fill-color: transparent;
    transition: all 0.3s ease;
}

.nav-link:hover i,
.nav-link.active i,
.btn-search:hover i,
.user-icon:hover i,
.nav-notification-desktop:hover i {
    -webkit-text-stroke: 0.8px currentColor;
    transform: scale(1.05);
}

/* Special handling for heart icon (far vs fas) */
.nav-link i.fa-heart,
.mobile-item i.fa-heart {
    -webkit-text-fill-color: transparent !important;
}

/* Mobile menu icons */
.mobile-item i {
    font-size: 1.1rem !important;
    -webkit-text-stroke: 0.6px currentColor;
    -webkit-text-fill-color: transparent;
    transition: all 0.3s ease;
}

.mobile-item.active i {
    -webkit-text-stroke: 0.8px currentColor;
    color: #000 !important;
}

/* =========================================
   DYNAMIC BREADCRUMB (Mobile Only)
   ========================================= */
.mobile-breadcrumb {
    display: none;
    background: var(--bg-surface); /* Fondo sólido para que no transparente contenido */
    border-bottom: 1px solid var(--border-subtle);
    padding: 10px 16px;
    align-items: center;
    gap: 12px;
    position: relative; /* Cambiado de sticky a relative */
    z-index: 990;
}

@media (max-width: 992px) {
    .mobile-breadcrumb.visible {
        display: flex;
    }
}

.breadcrumb-back {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--glass-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    cursor: pointer;
    border: none;
}

.breadcrumb-content {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.breadcrumb-home {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-home:hover {
    color: var(--primary);
}

.breadcrumb-separator {
    color: var(--text-tertiary);
    font-size: 0.6rem;
}

.breadcrumb-current {
    color: var(--primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

/* =========================================
   NEW MOBILE NAVBAR DESIGN
   ========================================= */

.mobile-nav {
    background-color: var(--bg-main);
    padding: 8px 4px; /* Aumentado para evitar recortes en hover/active */
}

.mobile-navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    overflow: visible !important;
}

/* Logo del sitio en navbar móvil */
.mobile-nav-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-right: 8px;
}

.mobile-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.mobile-logo-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.mobile-nav-left {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: flex-end;
    overflow: visible !important; /* Asegurar que las transformaciones y glows no se corten */
}

.mobile-nav-left::-webkit-scrollbar {
    display: none;
}

.mobile-nav-right {
    display: flex;
    align-items: center;
    gap: 2px; /* Espacio entre iconos del lado derecho */
    flex-shrink: 0; /* No encoger el lado derecho */
    margin-left: 4px; /* Espacio separador reducido */
}

/* Mobile navigation buttons - cuadrados compactos */
.mobile-nav-btn {
    background: none;
    border: none;
    color: var(--text-main);
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    flex-shrink: 0;
}

.mobile-nav-btn:hover,
.mobile-nav-btn:focus {
    color: var(--primary);
    transform: translateY(-2px);
}

.mobile-nav-btn.active {
    background-color: var(--glass-light);
    color: var(--primary);
}

.mobile-nav-btn.active::after {
    content: "";
    position: absolute;
    bottom: 4px;
    width: 4px;
    height: 4px;
    background-color: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--primary-glow);
}

.mobile-nav-btn i {
    font-size: 1.25rem !important;
    -webkit-text-stroke: 0.6px currentColor;
    -webkit-text-fill-color: transparent;
    transition: all 0.3s ease;
}

.mobile-nav-btn.active i,
.mobile-nav-btn:hover i {
    -webkit-text-stroke: 0.8px currentColor;
    -webkit-text-fill-color: currentColor; /* El icono se rellena */
    transform: scale(1.1);
}

/* Profile + Hamburger button - UN SOLO rectángulo con AMBOS iconos dentro */
.mobile-profile-menu-btn {
    background: var(--glass-light) !important;
    border: 1px solid var(--border-subtle) !important;
    color: var(--text-main) !important;
    width: auto !important;
    min-width: 85px !important; /* Aumentado para que no se vea 'corto' en ancho */
    height: 44px !important;
    border-radius: 14px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    padding: 4px 14px !important; /* Más padding lateral para equilibrar */
    flex-shrink: 0 !important;
    position: relative !important;
    gap: 12px !important;
    /* overflow: hidden eliminado para permitir el escalado de los iconos */
}

.mobile-profile-menu-btn:hover,
.mobile-profile-menu-btn:focus {
    background-color: var(--glass-medium) !important;
    border-color: var(--primary) !important;
    transform: translateY(-2px) !important;
}

.mobile-profile-menu-btn i.fas.fa-bars {
    font-size: 1.15rem !important; /* Aumentado de 1rem */
    color: var(--text-secondary) !important;
    -webkit-text-stroke: 0.5px currentColor;
    -webkit-text-fill-color: transparent;
}

.mobile-profile-menu-btn i.far.fa-user {
    font-size: 1.15rem !important; /* Aumentado para el icono de usuario fallback */
}

/* Avatar (cuando está logueado) */
.mobile-profile-menu-btn .user-icon {
    width: 26px !important; /* Aumentado ligeramente para mayor presencia visual */
    height: 26px !important;
    border-radius: 50% !important;
    display: block !important;
    object-fit: cover !important;
}

.mobile-profile-menu-btn:hover i.fas.fa-bars {
    color: var(--primary) !important;
    -webkit-text-fill-color: currentColor;
}

.mobile-profile-menu-btn:hover i {
    -webkit-text-stroke: 0.8px currentColor;
    transform: scale(1.05);
}

/* Mobile dropdown menu */
.mobile-nav-right .dropdown-menu {
    background-color: var(--bg-surface) !important;
    border: 1px solid var(--border-light) !important;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    padding: 8px;
    min-width: 200px;
    margin-top: 8px;
}

.mobile-nav-right .dropdown-item {
    color: var(--text-main) !important;
    padding: 10px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
}

.mobile-nav-right .dropdown-item:hover,
.mobile-nav-right .dropdown-item:focus {
    background-color: var(--glass-light) !important;
    color: var(--primary) !important;
    transform: translateX(4px);
}

.mobile-nav-right .dropdown-item i {
    -webkit-text-stroke: 0.6px currentColor;
    -webkit-text-fill-color: transparent;
    transition: all 0.3s ease;
    font-size: 0.9rem !important;
}

.mobile-nav-right .dropdown-item:hover i {
    -webkit-text-stroke: 0.8px currentColor;
    transform: scale(1.1);
}

.mobile-nav-right .dropdown-divider {
    border-color: var(--border-light) !important;
    margin: 8px 0;
}

/* Mobile dropdown menu - mejor posicionamiento */
.mobile-nav-right .dropdown-menu {
    background-color: var(--bg-surface) !important;
    border: 1px solid var(--border-light) !important;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    padding: 8px;
    min-width: 200px;
    margin-top: 6px;
    right: 0;
    left: auto;
}

.mobile-nav-right .dropdown-item {
    color: var(--text-main) !important;
    padding: 10px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
}

.mobile-nav-right .dropdown-item:hover,
.mobile-nav-right .dropdown-item:focus {
    background-color: var(--glass-light) !important;
    color: var(--primary) !important;
    transform: translateX(4px);
}

.mobile-nav-right .dropdown-item i {
    -webkit-text-stroke: 0.6px currentColor;
    -webkit-text-fill-color: transparent;
    transition: all 0.3s ease;
    font-size: 0.9rem !important;
}

.mobile-nav-right .dropdown-item:hover i {
    -webkit-text-stroke: 0.8px currentColor;
    transform: scale(1.1);
}

.mobile-nav-right .dropdown-divider {
    border-color: var(--border-light) !important;
    margin: 8px 0;
}

/* Mobile Side Panel - Right Slide */
.mobile-side-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-side-panel.active {
    opacity: 1;
    visibility: visible;
}

.mobile-side-panel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.mobile-side-panel-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 280px;
    height: 100%;
    background-color: var(--bg-surface);
    border-left: 1px solid var(--border-light);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.mobile-side-panel.active .mobile-side-panel-content {
    transform: translateX(0);
}

.mobile-side-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    background-color: var(--bg-main);
}

.mobile-side-panel-title {
    color: var(--text-main);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.mobile-side-panel-close {
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.mobile-side-panel-close:hover {
    background-color: var(--glass-light);
    color: var(--primary);
}

.mobile-side-panel-body {
    padding: 16px 0;
}

/* Balance JIN Card */
.mobile-jin-balance-card {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.12) 0%, rgba(202, 138, 4, 0.05) 100%);
    border: 1px solid rgba(234, 179, 8, 0.15);
    border-radius: 16px;
    margin: 0 16px 20px 16px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.jin-card-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.jin-coin-container {
    width: 38px;
    height: 38px;
    background: rgba(234, 179, 8, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #eab308;
}

.jin-coin-svg {
    width: 22px;
    height: 22px;
    filter: drop-shadow(0 0 4px rgba(234, 179, 8, 0.3));
}

.jin-card-texts {
    display: flex;
    flex-direction: column;
}

.jin-label {
    font-size: 0.7rem;
    color: #888;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    line-height: 1;
    margin-bottom: 2px;
}

.jin-value {
    font-size: 1.05rem;
    font-weight: 700;
    color: #eab308;
    line-height: 1.1;
}

.btn-add-jin {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #eab308;
    border: none;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.btn-add-jin:active {
    transform: scale(0.92);
}

.mobile-side-panel-section {
    margin-bottom: 24px;
}

.mobile-side-panel-section:last-child {
    margin-bottom: 0;
}

.mobile-side-panel-section-title {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px 20px;
    padding: 0;
}

.mobile-side-panel-list {
    display: flex;
    flex-direction: column;
}

.mobile-side-panel-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-main);
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.mobile-side-panel-item:hover {
    background-color: var(--glass-light);
    color: var(--primary);
    transform: translateX(4px);
}

.mobile-side-panel-item i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    -webkit-text-stroke: 0.6px currentColor;
    -webkit-text-fill-color: transparent;
}

.mobile-side-panel-item span {
    font-size: 0.95rem;
}

/* Estilos finales para el toggle +18 en el menú móvil */
.adult-toggle-item {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}

/* Reducir margen de los divisores que rodean al toggle +18 y ponerlos en rojo oscuro */
.adult-toggle-item + .mobile-side-panel-divider,
.mobile-side-panel-divider:has(+ .adult-toggle-item) {
    margin-top: 8px !important;
    margin-bottom: 8px !important;
    background-color: rgba(255, 77, 77, 0.2) !important;
}

.adult-badge-small {
    background-color: rgba(255, 77, 77, 0.15);
    color: #ff4d4d;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(255, 77, 77, 0.3);
    min-width: 35px;
    text-align: center;
}

.adult-text-rows {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.adult-title-main {
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
}

.adult-status-sub {
    font-size: 0.75rem;
    color: #888;
}

.adult-switch-red-sm {
    width: 2rem !important;
    height: 1.1rem !important;
    cursor: pointer;
}

.adult-switch-red-sm:checked {
    background-color: #ff4d4d !important;
    border-color: #ff4d4d !important;
}

.adult-switch-red-sm:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 77, 77, 0.25) !important;
}

/* Navbar Desktop Actions (Bóveda & Senda) */
.nav-btn-divine {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #eab308;
    padding: 8px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-boveda {
    width: 38px;
    height: 38px;
    font-size: 1rem;
    box-shadow: 0 0 0 rgba(234, 179, 8, 0);
}

.btn-boveda:hover {
    background: rgba(234, 179, 8, 0.1);
    border-color: rgba(234, 179, 8, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(234, 179, 8, 0.2), inset 0 0 10px rgba(234, 179, 8, 0.1);
    color: #facc15;
}

.btn-senda {
    padding: 6px 14px;
    font-weight: 800;
    font-size: 0.75rem;
    letter-spacing: 0.8px;
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.15) 0%, rgba(202, 138, 4, 0.05) 100%);
    border-color: rgba(234, 179, 8, 0.3);
    text-transform: uppercase;
    height: 38px;
}

.btn-senda span {
    font-family: 'Montserrat', sans-serif;
}

.btn-senda:hover {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.25) 0%, rgba(202, 138, 4, 0.1) 100%);
    border-color: #eab308;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(234, 179, 8, 0.25);
    color: #ffffff;
}

.btn-senda i {
    filter: drop-shadow(0 0 5px rgba(234, 179, 8, 0.6));
    animation: crown-pulse 2s infinite;
}

@keyframes crown-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.mobile-side-panel-divider {
    height: 1px;
    background-color: var(--border-light);
    margin: 16px 20px;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .mobile-nav {
        padding: 4px 6px; /* Márgenes ultra reducidos */
    }
    
    .mobile-nav-btn {
        width: 36px !important;
        height: 36px !important;
    }
    
    .mobile-profile-menu-btn {
        width: 40px !important; /* Mantener ancho suficiente para ambos iconos */
        height: 36px !important;
    }
    
    .mobile-nav-btn i,
    .mobile-profile-menu-btn i {
        font-size: 1.2rem !important; /* Mantener iconos visibles */
    }
    
    .mobile-nav-left {
        gap: 1px;
    }
    
    .mobile-nav-right {
        margin-left: 6px;
    }
    
    .mobile-nav-right .dropdown-menu {
        min-width: 180px;
        right: -8px;
    }
}

.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(252, 179, 84, 0.404);
    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 img {
    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%;
    z-index: 1;
    overflow: hidden;
}

.hero-featured-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: blur(5px) brightness(0.4);
    transform: scale(1.1);
    transition: 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 {
    color: #2ecc71;
    background: linear-gradient(135deg, rgba(46, 204, 112, 0.515), rgba(39, 174, 95, 0.515));
    box-shadow: 0 2px 8px rgba(46, 204, 113, 0.25);
}

#popular-slider .popular-status-badge.status-finished {
    color: #3498db;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.515), rgba(41, 128, 185, 0.515));
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.25);
}

#popular-slider .popular-status-badge.status-dropped {
    color: #e74c3c;
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.515), rgba(231, 76, 60, 0.515));
    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: 499px) {
    #popular-slider .popular-status-row {
        gap: 6px;
        justify-content: center;
        padding: 0;
        bottom: 10px;
    }
    #popular-slider .popular-rating-top {
        display: none !important;
    }
    #popular-slider .popular-status-badge {
        flex: 0 0 auto;
        font-size: 0.75rem;
        height: 24px;
        line-height: 24px;
        padding: 0 8px;
        border-radius: 4px;
    }
    #popular-slider .popular-icon-badge {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
}

@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);
}

/* Mobile Rating Redesign */
.rating-stars-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    padding: 5px;
}

.rating-star-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    user-select: none;
    touch-action: manipulation;
}

.rating-star-btn i {
    font-size: 1.1rem;
    color: var(--text-tertiary);
    transition: color 0.2s ease, transform 0.2s ease;
}

.rating-star-btn span {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.rating-star-btn.active {
    background: rgba(245, 165, 36, 0.12);
    border-color: rgba(245, 165, 36, 0.5);
    transform: scale(1.05);
}

.rating-star-btn.active i {
    color: var(--primary);
    text-shadow: 0 0 10px rgba(245, 165, 36, 0.4);
    transform: scale(1.1);
}

.rating-star-btn.active span {
    color: var(--primary);
}

.rating-star-btn:active {
    transform: scale(0.9);
}

@media (max-width: 380px) {
    .rating-stars-grid {
        gap: 6px;
    }
    .rating-star-btn {
        padding: 6px 4px;
    }
}

.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;
    content-visibility: auto;
    contain-intrinsic-size: auto 600px;
}

/* 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;
}

#home-rankings-section {
    content-visibility: auto;
    contain-intrinsic-size: auto 500px;
}

.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;
    }
    /* Fix synopsis padding on mobile */
    .detail-synopsis {
        padding-left: 1rem !important;
        padding-right: 1rem !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;
    }
    
    /* Fix genres layout on mobile */
    .detail-genres-row .d-flex {
        align-items: flex-start !important;
    }
    .detail-genres-badges {
        flex: 1;
    }
}

/* 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.58rem;
        white-space: nowrap; /* Prevent wrapping */
    }
    .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: 76px; /* Below navbar */
    left: 0; 
    width: 100%; 
    height: calc(100vh - 76px);
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 999; /* Below 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;
    margin-bottom: 0 !important;
}

.filter-modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2); /* Increased visibility */
    padding-bottom: 15px;
    margin-bottom: 25px !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#close-filter-btn {
    opacity: 0.8;
    transition: all 0.2s;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
#close-filter-btn:hover {
    opacity: 1;
    color: #fff;
    transform: scale(1.1);
    background: var(--primary);
    border-color: var(--primary);
    color: #000;
}

@media (max-width: 768px) {
    #close-filter-btn {
        width: 42px; /* Slightly larger touch target */
        height: 42px;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(4px);
        border-color: rgba(255, 255, 255, 0.2);
    }
}

.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 input {
    display: none;
}
.custom-radio label {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    background: #0a0a0a;
    border: 1px solid #222;
    color: #888;
    min-width: 80px;
    text-align: center;
}
.custom-radio label:hover {
    background: #111;
    border-color: #444;
    color: #ccc;
}
.custom-radio input:checked + label {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(245, 165, 36, 0.2);
}

@media (max-width: 768px) {
    #filter-type-container {
        display: flex !important;
        flex-wrap: wrap;
        justify-content: center !important;
        gap: 8px !important;
    }
    .custom-radio {
        width: calc((100% - 16px) / 3);
    }
    .custom-radio label {
        width: 100%;
        padding: 8px 4px;
        font-size: 0.85rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

#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;
        padding-top: 35px; /* Added internal spacing to separate content from navbar */
    }
    
    /* Position below mobile navbar */
    .filter-modal-overlay {
        z-index: 999 !important; 
        position: fixed !important;
        top: 64px !important;
        left: 0 !important;
        height: calc(100vh - 64px) !important;
    }
    
    /* Ensure content is strictly positioned */
    #series-filter-modal {
        z-index: 999 !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: 1.3rem; /* Increased size */
        margin: 0 !important; /* Reset margins for perfect flex alignment */
    }
    .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: Themed to match Gold/Black design */
.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: all 0.2s ease;
    letter-spacing: 0.5px;
}

/* Enabled State (Active) -> Solid Gold */
.btn-notif-on {
    background-color: var(--primary) !important;
    border: 1px solid var(--primary) !important;
    color: #000 !important;
    box-shadow: 0 0 10px rgba(245, 165, 36, 0.2);
}
.btn-notif-on:hover, .btn-notif-on:focus {
    background-color: #d48a1c !important; /* Darker gold */
    border-color: #d48a1c !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(245, 165, 36, 0.3);
}

/* Disabled State (Inactive) -> Outline Gold */
.btn-notif-off {
    background-color: transparent !important;
    border: 1px solid var(--primary) !important;
    color: var(--primary) !important;
    box-shadow: none;
}
.btn-notif-off:hover, .btn-notif-off:focus {
    background-color: rgba(245, 165, 36, 0.1) !important;
    box-shadow: 0 0 10px rgba(245, 165, 36, 0.1);
    transform: translateY(-1px);
}

#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;
    content-visibility: auto;
    contain-intrinsic-size: auto 400px;
}
.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;
    flex-shrink: 0;
    aspect-ratio: 1 / 1;
}

/* 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.685) !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: none !important; /* Moved to FAB */
        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;
    font-size: 0.85rem;
}
#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 0rem;
    }
    .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 */
}

/* =========================================
   RANKING PANEL REDESIGN (Chatbot Style)
   ========================================= */

/* Sliding Panel - Matches .chatbot-window */
.ranking-panel {
    position: fixed;
    top: 0;
    right: 0;
    transform: translateX(110%);
    width: 520px; /* Wider as requested */
    height: 100dvh;
    background: #050505;
    z-index: 1050;
    box-shadow: -15px 0 40px rgba(0,0,0,0.8); /* Refined shadow */
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(255,255,255,0.15); /* Stronger border for separation */
    will-change: transform;
}

.ranking-panel.open {
    transform: translateX(0);
}

.ranking-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6); /* Lighter opacity to see background content */
    z-index: 1045;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px); /* Reduced blur slightly */
}

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

/* Header - Redesigned Professional Look */
.ranking-header {
    padding: 30px 35px; /* More breathing room */
    background: #000000; /* Solid black */
    backdrop-filter: none; /* Removed for solid look */
    border-bottom: 1px solid rgba(255,255,255,0.15); /* More visible separator */
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.6); /* Added shadow for depth */
    z-index: 10;
}

/* Ambient Background Glow - Made much darker/subtle */
.ranking-header-bg-glow {
    position: absolute;
    top: -50%;
    left: -20%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 30%, rgba(251, 191, 36, 0.05), transparent 60%); /* Gold tint */
    pointer-events: none;
    z-index: 0;
}

.header-left-group {
    display: flex;
    align-items: center;
    gap: 24px; /* Increased gap */
    position: relative;
    z-index: 1;
}

/* New Icon Design */
.ranking-icon-wrapper {
    position: relative;
    width: 64px; /* Larger */
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ranking-icon-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.2) 0%, transparent 70%); /* Gold glow */
    filter: blur(15px);
    animation: glowPulse 3s infinite;
}

.ranking-icon-box {
    width: 56px;
    height: 56px;
    background: #0a0a0a;
    border: 1px solid rgba(255, 215, 0, 0.15);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
    transform: rotate(-5deg);
    transition: transform 0.3s ease;
}

.header-left-group:hover .ranking-icon-box {
    transform: rotate(0deg) scale(1.05);
    border-color: rgba(255, 215, 0, 0.4);
}

.ranking-icon-box i {
    font-size: 1.8rem;
    background: linear-gradient(to bottom, #d4af37, #b8860b); /* Darker gold */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.05); }
}

.ranking-header-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}

/* Title Row */
.ranking-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ranking-title {
    margin: 0;
    font-size: 1.5rem; /* Larger title */
    font-weight: 900;
    color: #e5e5e5; /* Slightly muted white */
    letter-spacing: 1px;
    text-transform: uppercase;
    line-height: 1;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* Cleaner font stack */
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.ranking-badge-pro {
    background: linear-gradient(135deg, #d4af37, #b8860b);
    color: #000;
    font-size: 0.6rem;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0,0,0, 0.6);
}

/* Subtitle Stats */
.ranking-subtitle {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 2px;
}

.ranking-stat {
    font-size: 0.75rem;
    color: #666; /* Darker grey */
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    letter-spacing: 0.5px;
}

.ranking-stat i {
    color: #444;
    font-size: 0.8rem;
}

.ranking-divider {
    width: 4px;
    height: 4px;
    background-color: #222;
    border-radius: 50%;
}

.ranking-live-indicator {
    font-size: 0.7rem;
    color: #b91c1c; /* Darker red */
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(185, 28, 28, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid rgba(185, 28, 28, 0.2);
}

.live-dot {
    width: 6px;
    height: 6px;
    background-color: #b91c1c;
    border-radius: 50%;
    animation: blinkLive 1.5s infinite;
}

@keyframes blinkLive {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}

/* Close Button - Larger and cleaner */
.ranking-close-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.03);
    color: #444;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 12px; /* Soft square */
    z-index: 2;
}

.ranking-close-btn:hover {
    background: rgba(185, 28, 28, 0.1); /* Red tint on hover */
    border-color: rgba(185, 28, 28, 0.3);
    color: #b91c1c;
    transform: rotate(90deg);
}

.ranking-close-btn i {
    font-size: 1.2rem;
}

/* Body */
.ranking-body {
    flex: 1;
    overflow-y: auto;
    padding: 0; /* Scrollbar sits on edge */
    background: #000000; /* Material Dark */
}

.ranking-list {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Ranking Items - Card Style like Chat Recommendations */
.ranking-item {
    display: flex;
    align-items: center;
    padding: 10px 14px; /* Reduced padding for compact look */
    background: #080808; /* Very dark grey, almost black */
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 12px; /* Slightly smaller radius */
    position: relative;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-bottom: 0;
    opacity: 0;
    animation: itemSlideIn 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.ranking-item:hover {
    background: #111;
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 15px rgba(0,0,0,0.6);
}

/* Top 3 Styling - Premium Cards */
.ranking-item:has(.rank-1) {
    background: linear-gradient(90deg, rgba(234, 179, 8, 0.15), rgba(0,0,0,0) 70%), #080808;
    border: 1px solid rgba(234, 179, 8, 0.3);
    box-shadow: 0 0 20px rgba(234, 179, 8, 0.1) inset;
    position: relative;
    overflow: hidden;
}

/* Side bar removed for Rank 1 */

.ranking-item:has(.rank-2) {
    background: linear-gradient(90deg, rgba(229, 231, 235, 0.1), rgba(0,0,0,0) 70%), #080808;
    border: 1px solid rgba(229, 231, 235, 0.3);
    box-shadow: 0 0 20px rgba(229, 231, 235, 0.05) inset;
    position: relative;
    overflow: hidden;
}

/* Side bar removed for Rank 2 */

.ranking-item:has(.rank-3) {
    background: linear-gradient(90deg, rgba(249, 115, 22, 0.1), rgba(0,0,0,0) 70%), #080808;
    border: 1px solid rgba(249, 115, 22, 0.3);
    box-shadow: 0 0 20px rgba(249, 115, 22, 0.05) inset;
    position: relative;
    overflow: hidden;
}

/* Side bar removed for Rank 3 */

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

/* Rank Number */
.ranking-number {
    width: 24px; /* Smaller */
    height: 24px; /* Smaller */
    min-width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.8rem; /* Smaller font */
    color: #444;
    background: #111;
    border-radius: 6px; /* Smaller radius */
    margin-right: 12px; /* Reduced margin */
}

.ranking-number.rank-1 { background: #EAB308; color: #fff; box-shadow: none; }
.ranking-number.rank-2 { background: #94A3B8; color: #fff; }
.ranking-number.rank-3 { background: #EA580C; color: #fff; }

/* Avatar */
.ranking-avatar-wrapper {
    width: 34px; /* Smaller */
    height: 34px; /* Smaller */
    min-width: 34px;
    margin-right: 12px; /* Reduced margin */
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

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

.ranking-avatar-initial {
    width: 100%;
    height: 100%;
    background: #252525;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem; /* Smaller font */
    text-transform: uppercase;
}

/* User Name */
.ranking-user-name {
    flex: 1;
    font-weight: 700;
    color: #f0f0f0;
    font-size: 0.85rem; /* Smaller font */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 5px;
    text-align: left;
    text-transform: none;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Level Badge (New Extra Feature) */
.ranking-level-badge {
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: rgba(255,255,255,0.1);
    color: #aaa;
}

.level-novato { background: rgba(100, 100, 100, 0.2); color: #ccc; }
.level-explorador { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.level-veterano { background: rgba(139, 92, 246, 0.2); color: #a78bfa; }
.level-maestro { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.level-leyenda { background: rgba(239, 68, 68, 0.2); color: #f87171; box-shadow: 0 0 5px rgba(239, 68, 68, 0.3); }

/* Hours Badge - Matches .action-chip style */
.ranking-hours-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--primary); /* Use accent color like chips */
    padding: 3px 8px; /* Smaller padding */
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.7rem; /* Smaller font */
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.ranking-hours-badge:hover {
    background: rgba(245, 165, 36, 0.15);
    border-color: var(--primary);
}

.ranking-hours-badge i {
    font-size: 0.7rem;
    color: var(--primary);
}

/* Floating Button - Matches Chat FAB */
.ranking-floating-btn {
    position: fixed;
    bottom: 20px;
    left: 30px; /* Left side to balance chat on right */
    background: linear-gradient(135deg, #1a1a1a, #252525);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 12px 24px;
    border-radius: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    cursor: pointer;
    z-index: 1040;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 10px;
}

.ranking-floating-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    border-color: var(--primary);
}

.ranking-floating-btn:hover .ranking-icon {
    transform: scale(1.1) rotate(-10deg);
}

.ranking-icon {
    font-size: 1.1rem;
    color: var(--primary);
    transition: transform 0.3s ease;
    filter: drop-shadow(0 0 5px rgba(245, 165, 36, 0.4));
    margin: 0;
}

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

/* =========================================
   CURRENT USER RANK FOOTER
   ========================================= */
.current-user-rank-container {
    padding: 12px 20px; /* Reduced padding */
    background: #000000;
    border-top: 1px solid rgba(255,255,255,0.15); /* More visible border */
    margin-top: auto;
    flex-shrink: 0;
}

.current-user-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px; /* Reduced margin */
}

.current-rank-label {
    font-size: 0.7rem; /* Smaller font */
    font-weight: 800;
    color: #fbbf24; /* Golden Yellow */
    text-transform: uppercase;
    letter-spacing: 1px;
}

.realtime-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.6rem; /* Smaller font */
    font-weight: 700;
    color: #666; /* Muted text */
    text-transform: uppercase;
}

.realtime-dot {
    width: 5px; /* Smaller dot */
    height: 5px;
    background-color: #f59e0b; /* Golden Orange dot */
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
    animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
    100% { opacity: 1; transform: scale(1); }
}

.current-user-card {
    display: flex;
    align-items: center;
    padding: 10px 14px; /* Significantly reduced padding */
    background: #151515;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px; /* Slightly smaller radius */
    transition: all 0.3s ease;
}

.current-user-card:hover {
    background: #1a1a1a;
    border-color: rgba(255, 255, 255, 0.15);
}

.current-rank-number {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #333;
    border-radius: 6px;
    font-size: 0.8rem; /* Smaller font */
    font-weight: 800;
    color: #fff;
    margin-right: 12px; /* Reduced margin */
    min-width: 24px; /* Reduced min-width */
    text-align: center;
}

.current-user-avatar {
    width: 36px; /* Smaller avatar */
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 12px; /* Reduced margin */
    border: 1px solid rgba(255,255,255,0.05);
}

.current-user-avatar-initial {
    width: 36px; /* Smaller avatar */
    height: 36px;
    border-radius: 50%;
    margin-right: 12px; /* Reduced margin */
    border: 1px solid rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem; /* Adjust font size for smaller avatar */
    color: #fff;
    text-transform: uppercase;
}

.current-user-info {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.current-user-name {
    font-weight: 700;
    font-size: 0.9rem; /* Smaller font */
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 8px; /* Space for badge */
}

.current-user-time {
    font-size: 0.75rem; /* Smaller font */
    font-weight: 700;
    color: #fbbf24; /* Golden Yellow */
    background: rgba(251, 191, 36, 0.1);
    padding: 3px 8px; /* Smaller padding */
    border-radius: 20px;
    border: 1px solid rgba(251, 191, 36, 0.2);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Mobile Optimization */
@media (max-width: 576px) {
    .ranking-panel {
        width: 100%;
        border-left: none;
        box-shadow: none !important; /* Performance: Remove shadow */
    }

    /* Reduce Motion & Transparency for Low-End Devices */
    .ranking-panel, .ranking-header, .ranking-item, .ranking-overlay {
        backdrop-filter: none !important;
        transition: transform 0.3s ease, opacity 0.3s ease !important; /* Simplify transitions */
    }
    
    .ranking-header-bg-glow, .ranking-icon-glow {
        display: none !important; /* Performance: Remove heavy gradients/glows */
    }

    /* Header Optimization */
    .ranking-header {
        padding: 25px 15px; /* Spacious padding */
        gap: 12px;
        height: auto;
    }

    .ranking-title {
        font-size: 1rem; /* Reduced title size */
    }

    .header-left-group {
        gap: 12px; /* Reduce gap for mobile */
    }

    .ranking-icon-wrapper {
        width: 42px; /* Increased from 32px */
        height: 42px;
    }

    .ranking-icon-box {
        width: 42px;
        height: 42px;
        transform: rotate(0deg); /* Remove rotation for better alignment */
    }
    
    .ranking-icon-box i {
        font-size: 1.3rem; /* Increased from 1rem */
    }

    .ranking-close-btn {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .ranking-item {
        animation: none !important; /* Performance: Remove list animations */
        opacity: 1 !important;
        transform: none !important;
        padding: 22px 16px; /* Increased vertical padding for more spacing */
        gap: 12px;
        display: flex;
        align-items: center;
    }

    /* Rank Number */
    .ranking-number {
        font-size: 0.7rem !important; /* Larger font */
        min-width: 24px !important; /* Larger box */
        margin-right: 8px !important ; /* More spacing */
        width: 22px !important;
        height: 24px !important;
    }

    /* Avatar */
    .ranking-avatar-wrapper {
        width: 44px; /* Increased from 40px */
        height: 44px;
        min-width: 44px;
        margin-right: 8px;
    }
    
    .ranking-avatar-initial {
        font-size: 1rem;
    }

    /* User Name Container */
    .ranking-user-name {
        flex: 1; /* Take remaining space */
        min-width: 0; /* Enable truncation */
        display: flex;
        align-items: center; /* Align badge with text */
        gap: 8px;
        font-size: 1rem; /* Increased from 0.95rem */
        padding-right: 0;
    }

    /* Name Text Wrapper (New) */
    .ranking-name-text {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        flex-shrink: 1; /* Allow shrinking/truncation */
    }

    /* Level Badge */
    .ranking-level-badge {
        font-size: 0.5rem; /* Reduced size */
        padding: 2px 5px; /* Reduced padding */
        flex-shrink: 0; /* Never shrink the badge */
        white-space: nowrap;
        margin-left: 0;
    }
    
    /* Hours Badge */
    .ranking-hours-badge {
        padding: 4px 10px;
        font-size: 0.85rem; /* Increased from 0.8rem */
        flex-shrink: 0;
        margin-left: auto; /* Push to the end */
    }

    /* Current User Footer Mobile */
    .current-user-rank-container {
        padding: 24px 15px; /* Increased vertical padding */
        padding-bottom: max(24px, env(safe-area-inset-bottom));
    }
    
    .current-user-card {
        padding: 10px 14px; /* Increased vertical padding */
    }
    
    .current-user-name {
        font-size: 0.85rem; /* Smaller font */
        gap: 6px;
    }

    .current-user-time {
        font-size: 0.6rem; /* Slightly smaller */
        padding: 3px 8px; /* Slightly smaller padding */
        border-radius: 50px; /* Fully rounded pill */
        background: rgba(251, 191, 36, 0.1); /* Subtle gold bg */
        border: 1px solid rgba(251, 191, 36, 0.3); /* Visible border */
        margin-left: auto;
    }

    /* Current User Elements Scaling */
    .current-user-avatar, .current-user-avatar-initial {
        width: 33px; /* Increased from 30px */
        height: 33px;
        margin-right: 8px;
        border-radius: 50%;
    }

    .current-rank-number {
        font-size: 0.7rem;
        width: 22px;
        height: 24px;
        margin-right: 8px;
    }

    /* Additional Header Tweaks */
    .ranking-title-row {
        gap: 6px;
    }

    .ranking-badge-pro {
        font-size: 0.5rem;
        padding: 1px 4px;
    }

    .ranking-subtitle {
        font-size: 0.6rem;
        flex-wrap: nowrap; /* Prevent wrapping */
        gap: 8px; /* Reduce gap */
        overflow: hidden; /* Prevent spill */
    }

    .ranking-stat {
        font-size: 0.6rem;
        white-space: nowrap;
    }
    
    .ranking-stat span {
        display: none; /* Hide text labels (GLOBAL, TOP 100) */
    }

    .ranking-live-indicator {
        font-size: 0.6rem;
        padding: 1px 6px;
    }

    .ranking-floating-btn {
        bottom: 85px; /* Above bottom nav if exists, or just higher */
        left: 20px;
        width: 48px;
        height: 48px;
        padding: 0;
        border-radius: 50%;
        justify-content: center;
        box-shadow: 0 4px 10px rgba(0,0,0,0.5); /* Simple shadow */
    }

    .ranking-btn-content span {
        display: none;
    }
    
    .ranking-list {
        padding: 10px;
    }

    /* Mobile Top 3 Optimization */
    .ranking-item:has(.rank-1),
    .ranking-item:has(.rank-2),
    .ranking-item:has(.rank-3) {
        box-shadow: none !important; /* Remove inner glow for performance */
        background-attachment: scroll !important; /* Prevent scroll lag */
    }
    
/* Mobile side bars removed */
}

@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;
    }
}

/* =========================================
   SYSTEM NOTIFICATION MODAL THEMES
   ========================================= */

/* Base Card Reset */
#sys-notif-card {
    background: #151515;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    transition: all 0.3s ease;
    /* Default variables */
    --theme-color: #f5a524; /* Default to Info/Site color */
    --theme-bg: #151515;
    --theme-glow: rgba(245, 165, 36, 0.15);
}

/* --- THEME: INFORMATION (Cyan/Blue) --- */
#sys-notif-card.type-info {
    --theme-color: #0dcaf0; /* Cyan */
    --theme-bg: #10151a; /* Slight blue tint */
    --theme-glow: rgba(13, 202, 240, 0.2);
    border-color: rgba(13, 202, 240, 0.3);
}

/* --- THEME: WARNING (Amber/Caution) --- */
#sys-notif-card.type-warning {
    --theme-color: #ffc107; /* Standard Bootstrap Warning */
    --theme-bg: #1a1510; /* Slight amber tint */
    --theme-glow: rgba(255, 193, 7, 0.2);
    border-color: rgba(255, 193, 7, 0.4);
}

/* --- THEME: URGENT (Red/Critical) --- */
#sys-notif-card.type-urgent {
    --theme-color: #dc3545; /* Red */
    --theme-bg: #1a1010; /* Slight red tint */
    --theme-glow: rgba(220, 53, 69, 0.3);
    border-color: rgba(220, 53, 69, 0.6);
    animation: urgentPulse 2s infinite;
}

@keyframes urgentPulse {
    0% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(220, 53, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}

/* Comments System Styles (Global) */
.comment-form-wrapper textarea {
    background-color: #0f0f0f !important;
    border: 1px solid rgba(255,255,255,0.1);
    color: #eee !important;
    transition: all 0.2s ease;
}

.comment-form-wrapper textarea:focus {
    background-color: #1a1a1a !important;
    color: #fff !important;
    border-color: rgba(245, 165, 36, 0.6) !important;
    box-shadow: 0 0 0 3px rgba(245, 165, 36, 0.15);
}

.comment-item {
    transition: background-color 0.2s ease;
    border: 1px solid transparent;
}

.comment-item:hover {
    background-color: rgba(255,255,255,0.08) !important;
    border-color: rgba(255,255,255,0.05);
}

.comment-text {
    word-break: break-word;
    color: var(--text-main, #e0e0e0); /* Ensure high visibility */
}

/* Reply Button */
.btn-reply {
    color: var(--text-secondary);
    transition: color 0.2s;
}
.btn-reply:hover {
    color: var(--primary);
}

/* Nested Replies Connection Line (Optional) */
.comment-item-wrapper {
    position: relative;
}

/* Apply Theme Variables to Elements */

/* 1. Side Stripe */
#sys-notif-stripe {
    background: var(--theme-color) !important;
    box-shadow: 0 0 15px var(--theme-color);
}

/* 2. Icon Badge */
#sys-notif-icon-badge {
    color: var(--theme-color) !important;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--theme-color);
    box-shadow: 0 0 10px var(--theme-glow);
}

/* 3. Title Color */
#sys-notif-title {
    color: var(--theme-color) !important;
}

/* 4. Progress Bar */
#sys-notif-progress {
    background: var(--theme-color) !important;
}

/* 5. Button */
#btn-dismiss-notification {
    background: var(--theme-color) !important;
    color: #000 !important;
    box-shadow: 0 4px 15px var(--theme-glow);
    border: none;
}
#btn-dismiss-notification:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

/* 6. Label Badge (COMUNICADO) */
#sys-notif-label {
    display: inline-block;
    font-size: 0.6rem;
    letter-spacing: 2px;
    padding: 4px 12px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--theme-glow), transparent);
    color: var(--theme-color) !important;
    border-left: 2px solid var(--theme-color);
    text-shadow: 0 0 10px var(--theme-glow);
    margin-bottom: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* Donator Cards - Refined Design */
.donator-card {
    background: rgba(20, 20, 20, 0.6);
    /* Removed heavy backdrop filter for performance */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    transition: border-color 0.2s ease, transform 0.2s ease;
    position: relative;
    overflow: hidden;
    height: 100%; /* Ensure consistent height */
}

/* Hover Effect - Simplified per user request (lightweight) */
.donator-card:hover {
    border-color: rgba(255, 193, 7, 0.5);
    background-color: rgba(30, 30, 30, 0.6);
    /* Removed heavy shadows and transforms */
}

/* Rank Number Styling */
.donator-rank-number {
    position: absolute;
    top: 0;
    right: 0;
    margin-right: 10px;
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.3); /* Brighter */
    font-weight: 800;
    font-size: 1.2rem; /* Reduced from 1.5rem */
    line-height: 1;
    pointer-events: none;
    z-index: 0;
}

/* Vacant Card Styling */
.donator-vacant {
    background: rgba(255, 255, 255, 0.05); /* Brighter background */
    border: 1px dashed rgba(255, 255, 255, 0.2); /* Brighter border */
}

.donator-vacant i {
    color: rgba(255, 255, 255, 0.4) !important; /* Brighter icon */
    opacity: 1 !important;
}

.donator-vacant h5 {
    color: rgba(255, 255, 255, 0.6) !important; /* Brighter text */
}

/* Glow Variants - Reduced Intensity */
.donator-glow-gold {
    border-bottom: 2px solid rgba(255, 193, 7, 0.4);
}
.donator-glow-cyan {
    border-bottom: 2px solid rgba(13, 202, 240, 0.4);
}
.donator-glow-red {
    border-bottom: 2px solid rgba(220, 53, 69, 0.4);
}
.donator-glow-blue {
    border-bottom: 2px solid rgba(13, 110, 253, 0.4);
}
.donator-glow-green {
    border-bottom: 2px solid rgba(25, 135, 84, 0.4);
}

/* Avatar Styling */
.donator-card img {
    border: 2px solid rgba(255, 255, 255, 0.1);
    padding: 2px;
}

.donator-glow-gold img { border-color: rgba(255, 193, 7, 0.5); }
.donator-glow-cyan img { border-color: rgba(13, 202, 240, 0.5); }
.donator-glow-red img { border-color: rgba(220, 53, 69, 0.5); }
.donator-glow-blue img { border-color: rgba(13, 110, 253, 0.5); }
.donator-glow-green img { border-color: rgba(25, 135, 84, 0.5); }

/* Typography */
.donator-card h5 {
    font-weight: 600;
    font-size: 1rem;
    margin-top: 5px;
}

.donator-amount {
    font-size: 1.1rem;
    font-weight: 700;
}

.donator-role-badge {
    font-size: 0.75rem !important;
    padding: 0.4em 0 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 100px;
    display: inline-flex !important;
    justify-content: center;
    align-items: center;
    vertical-align: middle;
    line-height: normal;
    color: #000 !important;
    font-weight: 700;
}

/* Mobile Optimization: Horizontal Scroll Carousel */
@media (max-width: 768px) {
    #top-donators-list {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory;
        gap: 4px; /* Ultra tight gap */
        padding-bottom: 10px; /* Space for scrollbar/shadow */
        -webkit-overflow-scrolling: touch;
    }

    #top-donators-list .col {
        /* Exactly 2 cards visible (50% - half gap) */
        flex: 0 0 calc(50% - 2px); 
        width: calc(50% - 2px);
        max-width: calc(50% - 2px);
        scroll-snap-align: start;
    }

    .donator-card {
        padding: 0.75rem; /* Reduced padding for more internal space */
        margin-bottom: 0;
        height: 100%;
    }

    .donator-rank-number {
        font-size: 0.9rem;
        margin-right: 6px;
        margin-top: 4px;
    }
    
    .donator-card h5 {
        font-size: 0.9rem; /* Adjust text size slightly */
    }
}

/* --- OPTIMIZACIÓN MÓVIL (Ranking de Lecturas) --- */
@media (max-width: 768px) {
    /* Optimizar renderizado de lista */
    .ranking-list {
        contain: content; /* Mejora rendimiento de renderizado */
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    /* Simplificar animaciones en items */
    .ranking-item {
        /* Reducir complejidad de capas */
        will-change: transform, opacity; 
        /* Asegurar altura mínima para evitar saltos */
        min-height: 50px;
        /* Acelerar animación en móvil */
        animation-duration: 0.3s !important;
        /* Asegurar visibilidad si la animación falla o tarda */
        animation-fill-mode: both;
        /* Reducir padding */
        padding: 8px 15px;
        margin-bottom: 0;
    }
    
    /* Layout más compacto en móvil */
    .ranking-avatar-wrapper {
        width: 33px;
        height: 33px;
        min-width: 33px;
    }
    
    .ranking-number {
        width: 18px;
        height: 18px;
        min-width: 18px;
        font-size: 9px;
    }

    /* Reducir efectos costosos en los top 3 */
    .ranking-item:has(.rank-1),
    .ranking-item:has(.rank-2),
    .ranking-item:has(.rank-3) {
        box-shadow: none !important;
        transform: none !important;
    }

    /* Desactivar efectos hover en táctil */
    .ranking-item:hover {
        transform: none !important;
        box-shadow: none !important;
    }

    /* Ajustes de texto para pantallas pequeñas */
    .ranking-user-name {
        font-size: 0.75rem;
    }
    
    .ranking-hours-badge {
        padding: 5px 10px;
        font-size: 8.5px;
    }
}

/* Guest Rank CTA */
.guest-rank-container {
    padding: 12px 20px;
    background: #000000;
    border-top: 1px solid rgba(255,255,255,0.15);
    margin-top: auto;
    flex-shrink: 0;
}

.guest-rank-card {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    transition: all 0.3s ease;
}

.guest-rank-icon-wrapper {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 193, 7, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.guest-rank-icon-wrapper i {
    color: #ffc107;
    font-size: 16px;
}

.guest-rank-content {
    display: flex;
    flex-direction: column;
    margin-right: auto;
}

.guest-rank-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
}

.guest-rank-desc {
    font-size: 0.75rem;
    color: #aaa;
}

.guest-rank-btn {
    background: var(--primary);
    color: #000;
    border: none;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.guest-rank-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

@media (max-width: 768px) {
    .guest-rank-container {
        padding: 24px 15px;
    }
}



/* =========================================
   SETTINGS REDESIGN — NEW LAYOUT
   ========================================= */

/* Block wrapper: label header + card */
.settings-section-block {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.settings-block-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.settings-block-label {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.settings-block-header::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.07);
}

/* Editable field row (current value + edit pencil) */
.settings-editable-field {
    position: relative;
    display: flex;
    align-items: center;
}

.settings-editable-field .form-control-custom {
    padding-right: 44px !important;
}

.settings-field-edit-btn {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    transition: color 0.2s ease, background 0.2s ease;
    font-size: 0.8rem;
    line-height: 1;
}

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

/* Toggle rows */
.settings-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 4px 0;
}

.settings-toggle-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}

.settings-toggle-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.settings-toggle-desc {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.settings-toggle-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.07);
    margin: 14px 0;
}

/* Toggle switch colors */
.settings-switch-cyan {
    width: 2.4rem;
    height: 1.3rem;
    cursor: pointer;
}
.settings-switch-cyan:checked {
    background-color: #06b6d4 !important;
    border-color: #06b6d4 !important;
}
.settings-switch-cyan:focus {
    box-shadow: 0 0 0 0.2rem rgba(6, 182, 212, 0.25) !important;
}

.settings-switch-red {
    width: 2.4rem;
    height: 1.3rem;
    cursor: pointer;
}
.settings-switch-red:checked {
    background-color: #f87171 !important;
    border-color: #f87171 !important;
}
.settings-switch-red:focus {
    box-shadow: 0 0 0 0.2rem rgba(248, 113, 113, 0.25) !important;
}

/* Permissions grid */
.settings-perms-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.settings-perm-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.settings-perm-row:last-child {
    border-bottom: none;
}

.settings-perm-key {
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.75rem;
}

.settings-perm-val {
    color: var(--primary);
    font-weight: 800;
    font-size: 0.78rem;
    letter-spacing: 0.5px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .settings-section-block .settings-card {
        border-radius: 16px;
    }

    .settings-toggle-title {
        font-size: 0.85rem;
    }

    .settings-toggle-desc {
        font-size: 0.72rem;
    }
}


/* =========================================
   SETTINGS STATS CARDS
   ========================================= */

.settings-stat-card {
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 1.4rem 1.2rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

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

.settings-stat-card:hover {
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.settings-stat-icon {
    font-size: 1.3rem;
    margin-bottom: 4px;
    line-height: 1;
}

.settings-stat-value {
    font-size: 2rem;
    font-weight: 900;
    color: var(--text-main);
    line-height: 1;
    letter-spacing: -0.02em;
    transition: opacity 0.3s ease;
}

.settings-stat-value.stats-loading {
    opacity: 0.3;
}

.settings-stat-label {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.settings-stat-label span {
    display: block;
    font-weight: 400;
    font-size: 0.6rem;
    letter-spacing: 0.5px;
    color: var(--text-tertiary);
    text-transform: none;
}

@media (max-width: 576px) {
    .settings-stat-value {
        font-size: 1.6rem;
    }
    .settings-stat-card {
        padding: 1.1rem 1rem 1rem;
        border-radius: 16px;
    }
}

/* ═══════════════════════════════════════
   PREMIUM / MEMBERSHIP SECTION
   ═══════════════════════════════════════ */

/* ── Hero ── */
.premium-hero {
    padding: 3rem 0 1rem;
}
.premium-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, rgba(245,165,36,0.15), rgba(234,179,8,0.05));
    border: 1px solid rgba(245,165,36,0.25);
    border-radius: 999px;
    padding: 0.5rem 1.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--primary);
}
.premium-hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: #fff;
    margin: 1.5rem 0 1rem;
    line-height: 1.15;
}
.premium-hero-subtitle {
    font-size: 1.05rem;
    line-height: 1.6;
}

/* ── Stats Cards ── */
.premium-stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-panel);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    transition: border-color 0.25s, transform 0.25s;
}
.premium-stat-card:hover {
    border-color: rgba(245,165,36,0.3);
    transform: translateY(-2px);
}
.premium-stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(245,165,36,0.1);
    color: var(--primary);
    font-size: 1.25rem;
    flex-shrink: 0;
}
.premium-stat-body {
    display: flex;
    flex-direction: column;
}
.premium-stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}
.premium-stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Plan Cards ── */
.premium-plan-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--bg-panel);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    padding: 2rem 1.5rem;
    transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
}
.premium-plan-card:hover {
    border-color: rgba(245,165,36,0.3);
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.premium-plan-card-featured {
    border-color: rgba(245,165,36,0.4);
    background: linear-gradient(180deg, rgba(245,165,36,0.08) 0%, var(--bg-panel) 40%);
}
.premium-plan-card-featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}
.premium-plan-badge {
    display: inline-block;
    background: rgba(245,165,36,0.15);
    color: var(--primary);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    margin-bottom: 1rem;
    align-self: flex-start;
}
.premium-plan-badge-featured {
    background: var(--primary);
    color: #000;
}
.premium-plan-header {
    margin-bottom: 1.25rem;
}
.premium-plan-icon {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}
.premium-plan-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
}
.premium-plan-price {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    margin-bottom: 0.25rem;
}
.premium-plan-price small {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text-secondary);
}
.premium-plan-jin {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}
.premium-plan-jin small {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 400;
}
.premium-plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    flex: 1;
}
.premium-plan-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 0.35rem 0;
}
.premium-plan-features li i {
    margin-top: 0.15rem;
    flex-shrink: 0;
}
.premium-plan-btn {
    display: block;
    width: 100%;
    padding: 0.7rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.9rem;
    border: none;
    transition: opacity 0.2s;
}
.premium-plan-btn:hover {
    opacity: 0.9;
}

/* ── Comparison Table ── */
.premium-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.06);
    background: var(--bg-panel);
}
.premium-comparison-table {
    width: 100%;
    min-width: 600px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.875rem;
}
.premium-comparison-table th,
.premium-comparison-table td {
    padding: 1rem 1.25rem;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.premium-comparison-table th {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.75rem;
    color: #fff;
    background: rgba(255,255,255,0.02);
    position: sticky;
    top: 0;
    z-index: 2;
}
.premium-comparison-table tbody tr:hover {
    background: rgba(255,255,255,0.02);
}
.premium-th-feature {
    text-align: left;
    color: var(--text-secondary) !important;
    font-weight: 600 !important;
}
.premium-th-free { color: var(--text-tertiary) !important; }
.premium-th-basic { color: #a0a0a0 !important; }
.premium-th-standard { color: var(--primary) !important; }
.premium-th-highlight { 
    background: rgba(245,165,36,0.08) !important;
    box-shadow: inset 0 3px 0 var(--primary);
}
.premium-th-premium { color: #e879f9 !important; }

.premium-td-feature {
    text-align: left;
    color: var(--text-secondary);
    font-weight: 500;
}
.premium-td-check { color: var(--success); font-size: 1rem; }
.premium-td-cross { color: var(--error); font-size: 1rem; }
.premium-td-muted { color: var(--text-tertiary); }

.premium-comparison-table tbody tr td:first-child {
    font-size: 0.8rem;
}

/* ── Donate Section ── */
.premium-donate-section {
    background: var(--bg-panel);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 20px;
    padding: 3rem 2rem;
}

/* ── Responsive ── */
@media (max-width: 767.98px) {
    .premium-hero { padding: 2rem 0 0.5rem; }
    .premium-stat-card { padding: 1rem; }
    .premium-stat-value { font-size: 1.25rem; }
    .premium-plan-card { padding: 1.5rem 1.25rem; }
    .premium-comparison-table { min-width: 500px; }
    .premium-comparison-table th,
    .premium-comparison-table td { padding: 0.75rem 0.75rem; font-size: 0.75rem; }
    .premium-donate-section { padding: 2rem 1.25rem; }
}

@media (max-width: 575.98px) {
    .premium-comparison-table { min-width: 420px; }
    .premium-comparison-table th,
    .premium-comparison-table td { padding: 0.6rem 0.5rem; font-size: 0.7rem; }
    .premium-plan-price { font-size: 1.5rem; }
}

/* ═══════════════════════════════════════
   JIN PAYMENT MODAL
   ═══════════════════════════════════════ */

.jin-payment-modal {
    background: var(--bg-panel) !important;
    border-radius: 20px !important;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}
.jin-payment-modal .modal-header {
    padding: 1.25rem 1.5rem 0.5rem;
}
.jin-payment-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(245,165,36,0.12);
    color: var(--primary);
    border: 1px solid rgba(245,165,36,0.2);
}

/* Summary Card */
.jin-payment-summary {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0;
}
.jin-payment-icon-wrap {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(245,165,36,0.15), rgba(245,165,36,0.05));
    border: 1px solid rgba(245,165,36,0.2);
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 0.25rem;
}
.jin-payment-name {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
}
.jin-payment-jin {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.1;
}
.jin-payment-jin span {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}
.jin-payment-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
}
.jin-payment-price small {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-secondary);
}
.jin-payment-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--success);
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    background: rgba(74,222,128,0.1);
    border: 1px solid rgba(74,222,128,0.2);
    margin-top: 0.25rem;
}

/* PayPal Container */
.jin-paypal-wrap {
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.jin-paypal-wrap .spinner-border {
    width: 1.5rem;
    height: 1.5rem;
}

/* Modal responsive */
@media (max-width: 575.98px) {
    .jin-payment-modal { border-radius: 16px !important; }
    .jin-payment-jin { font-size: 1.6rem; }
    .jin-payment-price { font-size: 1.1rem; }
}

/* ── DIVINARCH STORE ──────────────────────────────── */

/* ─── PANEL CONTAINER ─── */
.store-panel {
    background: #0a0a0a;
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 2rem 2.5rem 2rem;
    max-width: 100%;
    margin: 0 auto;
}
.store-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}
.store-panel-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 0.25rem;
}
.store-panel-title {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--text-main);
    margin: 0;
    letter-spacing: -0.5px;
}
.store-panel-balance {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 0.55rem 1rem;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
}
.store-panel-balance:hover {
    border-color: var(--primary);
    background: var(--primary-dim);
}
.store-panel-balance i {
    color: var(--primary);
    font-size: 1rem;
}
.store-panel-balance span {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-main);
}

/* ─── TABS ─── */
.store-panel-tabs {
    display: flex;
    gap: 0.25rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0;
}
.store-panel-tabs::-webkit-scrollbar { display: none; }
.store-panel-tab {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.6rem 1rem;
    border: none;
    background: transparent;
    color: var(--text-tertiary);
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.store-panel-tab i { font-size: 0.85rem; }
.store-panel-tab:hover {
    color: var(--text-secondary);
}
.store-panel-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* ─── SEPARATOR ─── */
.store-panel-sep {
    height: 1px;
    background: var(--border-subtle);
    margin: 0 0 0.75rem;
}

/* ─── TOOLBAR ─── */
.store-panel-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}
.store-panel-sort-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
}
.store-panel-sort-btn:hover,
.store-panel-sort-btn:focus {
    border-color: var(--border-light);
    color: var(--text-main);
    background: var(--glass-light);
}
.store-panel-sort-btn i:first-child { font-size: 0.75rem; }
.store-sort-chevron { font-size: 0.65rem; opacity: 0.6; }
.store-panel-sort-dropdown .dropdown-item {
    font-size: 0.82rem;
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
}
.store-panel-sort-dropdown .dropdown-item:hover {
    background: var(--glass-light);
    color: var(--text-main);
}
.store-panel-sort-dropdown .dropdown-item.active {
    background: var(--primary-dim);
    color: var(--primary);
}

/* ─── LOADING ─── */
.store-panel-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    gap: 1.25rem;
    text-align: center;
    width: 100%;
}
.store-panel-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border-subtle);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.store-panel-loading-text {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: 0;
    text-align: center;
}

/* ─── CONTENT ─── */
.store-panel-content {
    min-height: 300px;
}

/* ─── GRID ─── */
.store-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}
@media (min-width: 1600px) {
    .store-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 992px) {
    .store-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .store-panel { padding: 1.5rem; border-radius: 16px; }
    .store-panel-title { font-size: 1.3rem; }
    .store-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .coin-card { min-height: 220px; border-radius: 14px; }
    .coin-icon { width: 56px; height: 56px; }
    .coin-icon-inner { font-size: 1.3rem; }
    .coin-card-glow { width: 120px; height: 120px; }
    .coin-card-visual { padding-top: 1.5rem; }
    .coin-card-info { padding: 1rem 1.25rem 1.25rem; }
    .coin-card-name { font-size: 0.85rem; }
    .coin-card-price { font-size: 1rem; }
    .coin-card-hot { display: none !important; }
    .coin-card-bonus { display: none !important; }
    .store-panel-tab { padding: 0.5rem 0.8rem; font-size: 0.75rem; gap: 0.35rem; }
    .store-panel-tab i { font-size: 0.75rem; }
    .store-detail-footer-fixed { padding: 0.85rem 1.25rem; }
    .store-detail-footer-fixed small { font-size: 0.65rem; }
    .store-detail-footer-fixed .fs-5 { font-size: 1rem !important; }
    .store-detail-actions .store-detail-btn { padding: 0.45rem 0.9rem; font-size: 0.75rem; }
}
@media (max-width: 480px) {
    .store-grid { grid-template-columns: repeat(2, 1fr); gap: 0.4rem; }
    .store-panel-tab { padding: 0.45rem 0.65rem; font-size: 0.7rem; gap: 0.3rem; border-radius: 8px; }
    .store-panel-tab i { font-size: 0.7rem; }
    .store-card-media { aspect-ratio: 3/4; }
    .store-card-body { padding: 0.35rem 0.45rem 0.45rem; gap: 0.15rem; }
    .store-card-name { font-size: 0.6rem; }
    .store-card-subtitle { font-size: 0.52rem; }
    .store-card-price { font-size: 0.65rem; }
    .store-card-cta { padding: 0.15rem 0.35rem; font-size: 0.5rem; border-radius: 6px; }
    .store-panel { padding: 0.6rem; border-radius: 12px; }
    .store-panel-title { font-size: 0.9rem; }
    .store-panel-tabs { gap: 0.2rem; }
    .coin-card { min-height: 180px; border-radius: 10px; }
    .coin-icon { width: 44px; height: 44px; box-shadow: 0 2px 8px rgba(245,165,36,0.25), inset 0 1px 2px rgba(255,255,255,0.15), inset 0 -1px 2px rgba(0,0,0,0.2); }
    .coin-icon-inner { font-size: 1rem; }
    .coin-icon::after { inset: 3px; border-width: 1.5px; }
    .coin-card-glow { width: 90px; height: 90px; }
    .coin-card:hover .coin-card-glow { width: 100px; height: 100px; }
    .coin-card-visual { padding: 2.5rem 0 0; }
    .coin-card-info { padding: 0.75rem 1rem 1rem; }
    .coin-card-name { font-size: 0.75rem; margin-bottom: 0.15rem; }
    .coin-card-price { font-size: 0.85rem; }
    .coin-card-cta { display: none; }
    .coin-card-hot { display: none !important; }
    .coin-card-bonus { display: none !important; }
    .store-detail-footer-fixed { padding: 0.65rem 1rem; }
    .store-detail-footer-fixed small { font-size: 0.6rem; letter-spacing: 0.3px; }
    .store-detail-footer-fixed .fs-5 { font-size: 0.9rem !important; }
    .store-detail-actions .store-detail-btn { padding: 0.35rem 0.7rem; font-size: 0.7rem; border-radius: 8px; }
}
