*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    margin: 0;
    background: #0d0e12;
    color: #fff;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

/* 📱 Үндсэн хайрцаг - Гар утас (Босоо харагдац) */
.app {
    width: 100%;
    max-width: 480px;
    background: #14161d;
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    box-shadow: 0 0 40px rgba(0,0,0,0.6);
    position: relative;
}

/* 🎥 Video тоглуулагч цонх */
.video-preview {
    position: relative;
    flex: 0 0 220px;
    background: #000;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.video-preview video {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* ⚡ Удирдлагын товчлуурууд */
.custom-controls {
    position: absolute;
    left: 15px;
    right: 15px;
    bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(20, 22, 29, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 10px 16px;
    border-radius: 20px;
    z-index: 10;
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.custom-controls.hide {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
}

.control-group {
    display: flex;
    gap: 14px;
    align-items: center;
}

.custom-controls button {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.custom-controls button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

#playPause {
    background: #0066ff;
    width: 46px;
    height: 46px;
}

/* 📜 Сувгийн жагсаалтын ерөнхий хайрцаг */
.channel-list {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px;
}

.channel-list::-webkit-scrollbar {
    width: 6px;
}
.channel-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
}

/* --- 📱 ГАР УТАСНЫ БОСОО ҮЕИЙН СУВГИЙН ХЭМЖЭЭ (Том, дарахад амархан) --- */
.channel {
    display: flex;
    align-items: center;
    padding: 14px 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.channel:hover {
    background: rgba(255, 255, 255, 0.05);
}

.channel.active {
    background: linear-gradient(90deg, rgba(0, 102, 255, 0.15), rgba(0, 195, 255, 0.05));
    border-color: rgba(0, 195, 255, 0.3);
}

.channel.active .title { color: #00c3ff; font-weight: 600; }
.channel.active .logo { background: #0066ff; color: #fff; box-shadow: 0 0 12px rgba(0, 102, 255, 0.4); }

.logo {
    width: 54px;
    height: 36px;
    background: #252936;
    color: #a0a5b5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 13px;
    margin-right: 14px;
    border-radius: 8px;
}

.info { flex: 1; }
.title { font-size: 15px; color: #e2e8f0; }

/* Дэлгэц дээр харагдах сувгийн нэр (Overlay) */
.channel-overlay {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(20, 22, 29, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #00c3ff;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    z-index: 20;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.channel-overlay.show { opacity: 1; transform: translateY(0); }


/* --- 💻 КОМПЬЮТЕР ЭСВЭЛ ТОМ ДЭЛГЭЦЭН ДЭЭРХ ТОХИРГОО --- */
@media screen and (min-width: 768px) {
    .app {
        max-width: 100% !important; 
        flex-direction: row;        
    }
    .video-preview {
        flex: 4.2;                  
        height: 100vh;
    }
    .video-preview video {
        object-fit: contain;        
    }
    .channel-list {
        flex: 1;                    
        height: 100vh;
        border-left: 1px solid #252936;
        padding: 8px;
    }
    .channel {
        padding: 8px 8px;           
        margin-bottom: 5px;
        border-radius: 8px;
    }
    .logo {
        width: 40px;                
        height: 26px;
        margin-right: 10px;
        font-size: 11px;
    }
    .title { font-size: 13.5px; }
}


/* --- 🔄 ГАР УТАС ХЭВТЭЭ (LANDSCAPE) БОЛОХ ҮЕИЙН ТОХИРГОО --- */
@media screen and (max-width: 900px) and (orientation: landscape) {
    .app {
        flex-direction: row;
        max-width: 100%;
    }
    .video-preview {
        flex: 3; 
        height: 100%;
    }
    .video-preview video {
        object-fit: contain;
    }
    .channel-list {
        flex: 1.2; 
        height: 100%;
        border-left: 1px solid #252936;
        padding: 6px;
    }
    .channel {
        padding: 6px 6px;
        margin-bottom: 4px;
        border-radius: 6px;
    }
    .logo {
        width: 38px;
        height: 24px;
        font-size: 11px;
        margin-right: 8px;
    }
    .title { font-size: 12.5px; }
}