:root {
    --bg-color: #0f0f13;
    --sidebar-bg: rgba(20, 20, 25, 0.7);
    --text-color: #ffffff;
    --accent-color: #3b82f6;
    /* Blue */
    --accent-glow: rgba(59, 130, 246, 0.4);
    --hover-bg: rgba(255, 255, 255, 0.1);
    --border-color: rgba(255, 255, 255, 0.05);
    --glass-blur: 20px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    height: 100vh;
    overflow: hidden;
    background-image: radial-gradient(circle at 10% 20%, rgba(30, 30, 50, 0.5) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(50, 20, 40, 0.3) 0%, transparent 40%);
}

.app-container {
    display: flex;
    height: 100%;
    width: 100%;
}

/* Sidebar */
.sidebar {
    width: 300px;
    background: var(--sidebar-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 20px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
    z-index: 10;
}

.brand h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 30px;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.brand span {
    color: var(--accent-color);
    text-shadow: 0 0 10px var(--accent-glow);
}

.channel-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Scrollbar styling */
.channel-list::-webkit-scrollbar {
    width: 6px;
}

.channel-list::-webkit-scrollbar-track {
    background: transparent;
}

.channel-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.channel-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
    border: 1px solid transparent;
}

.channel-item:hover {
    background: var(--hover-bg);
}

.channel-item.active {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.1);
}

.channel-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #333;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: #888;
    overflow: hidden;
}

.channel-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.channel-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
}

.channel-item.active .channel-name {
    color: #fff;
    font-weight: 600;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    position: relative;
    overflow-y: auto;
}

/* Main Content Layout */
.content-layout {
    display: flex;
    gap: 20px;
    width: 100%;
    max-width: 1400px;
    justify-content: center;
    align-items: flex-start;
}

.video-container {
    flex: 3;
    /* Takes up 3 parts of space */
    width: 100%;
    max-width: 1000px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
}

/* Watermark */
.watermark {
    position: absolute;
    top: 20px;
    right: 20px;
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.4);
    z-index: 10;
    pointer-events: none;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
    background: rgba(0, 0, 0, 0.1);
    padding: 5px 10px;
    border-radius: 5px;
    backdrop-filter: blur(2px);
}

/* Advertisement Space */
.ad-space {
    flex: 1;
    /* Takes up 1 part of space */
    min-width: 300px;
    max-width: 350px;
    height: auto;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    aspect-ratio: 1/1;
    /* Square ad box roughly */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.ad-content {
    text-align: center;
    color: var(--accent-color);
    border: 2px dashed rgba(59, 130, 246, 0.3);
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 12px;
    position: relative;
    background: rgba(0, 0, 0, 0.2);
}

.ad-content h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 10px var(--accent-color);
    animation: scan 3s linear infinite;
    opacity: 0.7;
}

@keyframes scan {
    0% {
        top: 0%;
        opacity: 0;
    }

    10% {
        opacity: 0.8;
    }

    90% {
        opacity: 0.8;
    }

    100% {
        top: 100%;
        opacity: 0;
    }
}

.iframe-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 Aspect Ratio */
    height: 0;
    background: #000;
}

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

.video-info {
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
}

.video-info h2 {
    font-size: 1.2rem;
    font-weight: 600;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.status-badge.live {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }

    100% {
        opacity: 1;
    }
}

/* Watching List Section */
.watching-section {
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid var(--border-color);
}

.watching-section h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.watching-list {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding-bottom: 10px;
}

.watching-list::-webkit-scrollbar {
    height: 6px;
}

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

.watching-item {
    min-width: 160px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    padding: 10px;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    border: 1px solid transparent;
}

.watching-item:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(59, 130, 246, 0.3);
}

.watching-thumbnail {
    width: 100%;
    height: 90px;
    background: #222;
    border-radius: 8px;
    margin-bottom: 8px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    font-size: 2rem;
}

.watching-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.watching-info h4 {
    font-size: 0.9rem;
    color: #fff;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.watching-stats {
    display: flex;
    align-items: center;
    font-size: 0.75rem;
    color: #aaa;
    gap: 5px;
}

.watching-dot {
    width: 6px;
    height: 6px;
    background: #ef4444;
    border-radius: 50%;
    box-shadow: 0 0 5px #ef4444;
}

/* Responsive Design */
@media (max-width: 1100px) {
    .content-layout {
        flex-direction: column;
        align-items: center;
    }

    .video-container {
        flex: none;
        width: 100%;
    }

    .ad-space {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        aspect-ratio: auto;
        height: 150px;
        /* Horizontal banner on smaller screens */
        flex: none;
    }

    .ad-content {
        flex-direction: row;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        padding: 10px 15px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        background: rgba(20, 20, 25, 0.9);
        /* Slightly more opaque on mobile */
    }

    .brand h1 {
        margin-bottom: 0;
        font-size: 1.1rem;
    }

    .channel-list {
        flex-direction: row;
        overflow-x: auto;
        gap: 10px;
        padding-left: 15px;
        /* Improved mask for scroll indication */
        mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
        -webkit-mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
        flex: 1;
        margin-left: 15px;
        /* Hide scrollbar but allow functionality */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .channel-list::-webkit-scrollbar {
        display: none;
    }

    .channel-item {
        flex-shrink: 0;
        padding: 6px 12px;
        border-radius: 20px;
        /* Pill shape for mobile */
        background: rgba(255, 255, 255, 0.05);
        /* Slight background for visibility */
    }

    .channel-item.active {
        background: var(--accent-color);
        border-color: var(--accent-color);
    }

    .channel-icon {
        margin-right: 6px;
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
    }

    .channel-name {
        font-size: 0.8rem;
        white-space: nowrap;
    }

    .main-content {
        padding: 15px;
        display: block;
    }

    .video-container {
        margin-top: 10px;
        width: 100%;
        border-radius: 12px;
    }

    .video-info {
        padding: 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .video-info h2 {
        font-size: 1rem;
    }

    .status-badge {
        font-size: 0.65rem;
        padding: 4px 10px;
        align-self: flex-start;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .main-content {
        padding: 10px;
    }

    .ad-content h3 {
        font-size: 1rem;
    }

    .brand h1 {
        font-size: 1rem;
        display: none;
        /* Hide brand on very small screens to give space to channels */
    }

    .sidebar {
        padding: 10px;
    }


}