@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800;900&display=swap');

:root {
    --brand-color: #E50914;
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.15);
}

body {
    background-color: #000;
    color: #e5e5e5;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.page {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    padding-top: 70px;
}

.page.active {
    display: block;
    opacity: 1;
}

/* --- REPLACED BORDER WITH SHADOW SEPARATOR --- */
.glass-header {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(15px);
    /* Replaced border-bottom with a subtle shadow gradient */
    box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.05); 
    border-bottom: none;
}

.glass-nav {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    /* Replaced border-top with a subtle shadow gradient */
    box-shadow: 0 -1px 0 0 rgba(255, 255, 255, 0.05);
    border-top: none;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    background: #000;
    z-index: 50;
    /* Add a bottom glow instead of a line */
    box-shadow: 0 10px 30px -10px rgba(0,0,0,1);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.tab-btn.active {
    color: #fff;
    /* Replaced solid border with a glowing gradient underline */
    border-bottom: none;
    box-shadow: 0 2px 0 0 var(--brand-color), 0 4px 10px -2px rgba(229, 9, 20, 0.5);
}

/* Draggable Horizontal Lists */
.drag-scroll {
    cursor: grab;
    overflow-x: auto;
    user-select: none;
}

.drag-scroll.active {
    cursor: grabbing;
    cursor: -webkit-grabbing;
    transform: scale(1);
}

/* Rank Numbers */
.rank-number {
    font-size: 8rem;
    line-height: 1;
    font-weight: 900;
    position: absolute;
    left: -10px;
    bottom: -10px;
    color: #000;
    -webkit-text-stroke: 2px #555;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    z-index: 0;
    opacity: 0.8;
    letter-spacing: -10px;
}

.rank-card-image {
    z-index: 10;
    position: relative;
    margin-left: 2rem;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.5);
}

/* --- SERVER MODAL (UNIQUE BORDER REPLACEMENT) --- */
.server-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #1A1A1A;
    
    /* REMOVED: border: 1px solid ... */
    border: none;
    /* ADDED: Inset ring (looks like a glass edge) */
    box-shadow: inset 0 0 0 1px var(--glass-border);
    
    border-radius: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.server-item:hover {
    background: #252525;
    /* ADDED: Brighter inset ring on hover */
    box-shadow: inset 0 0 0 1px var(--glass-highlight);
    transform: translateY(-1px);
}

.server-item.active {
    background: rgba(229, 9, 20, 0.05);
    /* ADDED: Brand colored glow ring instead of solid border */
    box-shadow: inset 0 0 0 1px var(--brand-color), 0 0 15px rgba(229, 9, 20, 0.15);
}

.server-item.active .server-name {
    color: var(--brand-color);
    font-weight: 700;
}

.server-item.active .check-icon {
    opacity: 1;
    color: var(--brand-color);
}

.check-icon {
    opacity: 0;
    transition: opacity 0.2s;
}

/* --- GENRE CARDS (GLASS EDGE EFFECT) --- */
.genre-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    
    /* REMOVED: border: 1px solid rgba(255, 255, 255, 0.1); */
    border: none;
    /* ADDED: Inner light highlight top/left, shadow bottom/right */
    box-shadow: inset 1px 1px 0 0 rgba(255, 255, 255, 0.1), inset -1px -1px 0 0 rgba(0, 0, 0, 0.5);
}

.genre-card:hover {
    transform: scale(1.03);
    /* ADDED: Brand glow on hover */
    box-shadow: inset 0 0 0 1px var(--brand-color), 0 5px 15px rgba(0,0,0,0.5);
}

.genre-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.1));
    z-index: 10;
}

.genre-title {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 20;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 1.1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* --- HERO STYLES --- */
#hero-metadata {
    transition: all 0.4s ease-out;
}

.hero-dot {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-slide {
    will-change: opacity;
}

/* --- LOADERS --- */
#app-splash {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease-out;
}

.splash-loader {
    height: 20px;
    aspect-ratio: 6;
    display: flex;
}

.splash-loader:before,
.splash-loader:after {
    content: "";
    flex: 1;
    padding-left: calc(100%/6);
    background: radial-gradient(closest-side at calc(100%/3) 50%, var(--brand-color) 90%, #0000) 0/75% 100% content-box;
    animation: l20 1.5s infinite;
}

.splash-loader:after {
    --_s: -1;
}

@keyframes l20 {
    0% { transform: scale(var(--_s, 1)) translate(0) rotate(0) }
    25% { transform: scale(var(--_s, 1)) translate(-25%) rotate(0) }
    50% { transform: scale(var(--_s, 1)) translate(-25%) rotate(1turn) }
    75%, 100% { transform: scale(var(--_s, 1)) translate(0) rotate(1turn) }
}

.content-loader-container {
    display: flex;
    justify-content: center;
    padding: 20px;
    width: 100%;
}

.content-loader {
    transform: rotateZ(45deg);
    perspective: 1000px;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    color: #fff;
    position: relative;
}

.content-loader:before,
.content-loader:after {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: inherit;
    height: inherit;
    border-radius: 50%;
    transform: rotateX(70deg);
    animation: 1s spin linear infinite;
}

.content-loader:after {
    color: var(--brand-color);
    transform: rotateY(70deg);
    animation-delay: .4s;
}

@keyframes spin {
    0%, 100% { box-shadow: .2em 0px 0 0px currentcolor; }
    12% { box-shadow: .2em .2em 0 0 currentcolor; }
    25% { box-shadow: 0 .2em 0 0px currentcolor; }
    37% { box-shadow: -.2em .2em 0 0 currentcolor; }
    50% { box-shadow: -.2em 0 0 0 currentcolor; }
    62% { box-shadow: -.2em -.2em 0 0 currentcolor; }
    75% { box-shadow: 0px -.2em 0 0 currentcolor; }
    87% { box-shadow: .2em -.2em 0 0 currentcolor; }
}

/* Load More Button */
.load-more-btn {
    margin: 2rem auto;
    display: block;
    background: #1F1F1F;
    /* REMOVED: border: 1px solid ... */
    border: none;
    /* ADDED: Neumorphic dark button shadow */
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1), 0 4px 6px rgba(0,0,0,0.3);
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: bold;
    transition: all 0.2s;
}

.load-more-btn:hover {
    background: var(--brand-color);
    transform: scale(1.05);
    /* Remove inner border on hover, add glow */
    box-shadow: 0 0 20px rgba(229, 9, 20, 0.4);
}

.skeleton {
    background: #1F1F1F;
    background-image: linear-gradient(to right, #1F1F1F 0%, #2a2a2a 20%, #1F1F1F 40%, #1F1F1F 100%);
    background-repeat: no-repeat;
    background-size: 800px 100%;
    animation: shimmer 1.5s infinite linear;
}

@keyframes shimmer {
    0% { background-position: -468px 0; }
    100% { background-position: 468px 0; }
}

#global-search-overlay {
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 100;
}

#global-search-overlay.open {
    transform: translateY(0);
}

.toast-enter {
    animation: slideInRight 0.4s forwards;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* --- EPISODE CARD STYLES (List View) --- */
.ep-card-container {
    display: flex;
    align-items: center;
    /* Gradient Separator */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    border-radius: 8px;
    margin-bottom: 4px;
}

.ep-card-container:hover {
    background-color: rgba(255, 255, 255, 0.05);
    padding-left: 10px; /* Slight slide effect on hover */
}

/* ACTIVE EPISODE STYLE */
.ep-card-container.active-episode {
    background: linear-gradient(90deg, rgba(229, 9, 20, 0.1) 0%, rgba(0,0,0,0) 100%) !important;
    border-left: 3px solid var(--brand-color);
    border-bottom: 1px solid transparent;
}

/* Make the number glow when active */
.ep-card-container.active-episode .ep-number {
    color: var(--brand-color);
    text-shadow: 0 0 10px rgba(229, 9, 20, 0.5);
}

.ep-info {
    width: 100%;
}

.ep-number {
    font-variant-numeric: tabular-nums; /* Keeps numbers aligned */
}

/* Locked / Coming Soon logic */
.ep-card-container.locked {
    opacity: 0.5;
    cursor: not-allowed;
}
.ep-card-container.locked:hover {
    background-color: transparent;
    padding-left: 8px; /* Reset slide effect */
}

/* --- INFO BOX STYLES --- */
.info-box {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    /* Soft neumorphic shadow instead of border */
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
}
.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.85rem;
}
.info-label {
    color: #888;
}
.info-value {
    color: white;
    font-weight: 500;
    text-align: right;
}
#player-controls-container {
    /* 1. Make the bar invisible */
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;

    /* 2. Remove internal fat (padding) */
    padding-top: 0 !important;
    padding-bottom: 0 !important;

    /* 3. IMPORTANT: Keep distance from the Server Area above */
    margin-top: 15px !important; 
    
    /* Optional: Keep distance from the text description below */
    margin-bottom: 10px !important;
}