:root {
    --primary-color: #e50914;
    --primary-hover: #ff1c28;
    --bg-dark: #0a0a0a;
    --bg-panel: rgba(25, 25, 25, 0.6);
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    background-image:
        radial-gradient(circle at 15% 50%, rgba(229, 9, 20, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(0, 113, 235, 0.08), transparent 25%);
}

.app-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Header */
.app-header {
    padding: 10px 0 20px 0;
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* News Ticker */
.news-ticker-container {
    display: flex;
    background: var(--bg-panel);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.ticker-label {
    background: var(--primary-color);
    color: white;
    font-weight: bold;
    padding: 10px 15px;
    white-space: nowrap;
    text-transform: uppercase;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.ticker-content {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 10px;
    font-size: 15px;
    overflow: hidden;
    white-space: nowrap;
}

.ticker-scroll {
    display: inline-block;
    padding-left: 100%;
    animation: scroll-left 25s linear infinite;
}

@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

.app-header h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.app-header h1 span {
    color: var(--primary-color);
}

/* Main Content Layout */
.main-content {
    display: flex;
    gap: 25px;
    flex: 1;
    min-height: 0;
    /* Important for flex children to scroll */
}

/* Player Section */
.player-section {
    flex: 3;
    background: var(--bg-panel);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

.video-container {
    width: 100%;
    height: 100%;
    position: relative;
    background: #000;
}

video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    outline: none;
    background-color: #000;
}

/* Hide default controls */
video::-webkit-media-controls {
    display: none !important;
}

/* Video Watermark */
.video-watermark {
    position: absolute;
    bottom: 70px;
    right: 30px;
    font-size: 20px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 2px;
    pointer-events: none;
    user-select: none;
    z-index: 10;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    font-family: 'Outfit', 'Inter', sans-serif;
    transition: opacity 0.3s ease;
}

.video-watermark span {
    color: rgba(229, 9, 20, 0.5);
    /* Primary red, slightly transparent */
}

/* Sidebar */
.sidebar {
    flex: 1;
    background: var(--bg-panel);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 25px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.sidebar h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-main);
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 15px;
}

.server-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
    padding-right: 5px;
}

/* Custom Scrollbar for Server List */
.server-list::-webkit-scrollbar {
    width: 6px;
}

.server-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.server-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    color: var(--text-main);
}

.server-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.server-btn.active {
    background: rgba(229, 9, 20, 0.15);
    border-color: var(--primary-color);
}

.server-btn.active .play-icon {
    color: var(--primary-color);
    opacity: 1;
}

.server-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.server-name {
    font-size: 1rem;
    font-weight: 600;
}

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

.play-icon {
    font-size: 1.2rem;
    opacity: 0.3;
    transition: all 0.3s ease;
}

/* Toast Notification */
.toast-notification {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(229, 9, 20, 0.9);
    color: white;
    padding: 12px 25px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    z-index: 999999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease, background 0.3s ease;
    display: none;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

/* 3-Dot Loader */
.custom-loader-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease;
    opacity: 0;
    backdrop-filter: blur(2px);
}

.dots-container {
    display: flex;
    gap: 8px;
}

.dot {
    width: 14px;
    height: 14px;
    background-color: var(--primary-color);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.dot:nth-child(1) {
    animation-delay: -0.32s;
}

.dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

/* Shaka Player Customizations */
.shaka-spinner-container,
.shaka-playback-rate-button,
.shaka-volume-bar-container {
    display: none !important;
}

.shaka-mute-button {
    width: 40px !important;
    display: inline-block !important;
}

/* Responsive Design */
@media screen and (max-width: 1024px) {
    .main-content {
        flex-direction: column;
    }

    .player-section {
        flex: none;
        height: 50vh;
    }

    .sidebar {
        flex: none;
        height: auto;
    }
}

@media screen and (max-width: 768px) {
    .app-container {
        padding: 10px;
    }

    .player-section {
        height: 40vh;
        border-radius: 12px;
    }

    .sidebar {
        border-radius: 12px;
        padding: 15px;
    }
}

/* Live Visitor Badge */
.live-visitor-badge {
    background: rgba(229, 9, 20, 0.15);
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(229, 9, 20, 0.4);
    margin-top: 10px;
}

.red-dot {
    width: 8px;
    height: 8px;
    background-color: #e50914;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(229, 9, 20, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(229, 9, 20, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(229, 9, 20, 0);
    }
}