body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background-color: #000;
    color: #fff;
    overflow-x: hidden;
}

#player-container {
    position: relative;
    width: 100%;
    height: 60vh;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    background: #000;
}

.video-js {
    width: 100% !important;
    height: 100% !important;
}

#stream-list {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    max-width: 95%;
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    background-color: rgba(20, 20, 20, 0.85);
    backdrop-filter: blur(10px);
    padding: 12px 18px;
    border-radius: 30px;
    z-index: 20;
    overflow-x: auto;
    gap: 12px;
    -webkit-overflow-scrolling: touch;
}

#stream-list::-webkit-scrollbar {
    display: none;
}

.stream-item {
    background-color: #444;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.3);
    width: 55px;
    height: 55px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    text-shadow: 1px 1px 2px #000;
    transition: transform 0.2s, border-color 0.2s;
    background-position: center;
    background-repeat: no-repeat;
}

.stream-item:active {
    transform: scale(0.9);
    border-color: #00ff00;
}

#schedule-section {
    background: linear-gradient(180deg, #0a0a0a 0%, #1a1a1a 100%);
    padding: 30px 20px 50px;
    overflow-y: auto;
}

#schedule-section h1 {
    text-align: center;
    font-size: 28px;
    margin: 0 0 10px;
    color: #fff;
    font-weight: 700;
}

#schedule-section p {
    text-align: center;
    color: #999;
    margin: 0 0 30px;
    font-size: 14px;
}

.schedule-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.tab-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    padding: 10px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.tab-btn:hover {
    background: rgba(255,255,255,0.15);
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
}

.schedule-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.schedule-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.match-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 15px;
    padding: 18px;
    margin-bottom: 15px;
    transition: all 0.3s;
}

.match-card:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.match-time {
    color: #00ff88;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 8px;
}

.match-teams {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #fff;
}

.match-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.match-league {
    color: #aaa;
    font-size: 13px;
}

.match-tv {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.no-matches {
    text-align: center;
    color: #666;
    padding: 40px 20px;
    font-size: 16px;
}

#loading-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

#loading-wrapper.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader {
    width: 55px;
    aspect-ratio: 1;
    --g1:conic-gradient(from 90deg at 3px 3px, #0000 90deg, #fff 0);
    --g2:conic-gradient(from -90deg at 22px 22px, #0000 90deg, #fff 0);
    background: var(--g1), var(--g1), var(--g1), var(--g2), var(--g2), var(--g2);
    background-size: 25px 25px;
    background-repeat: no-repeat;
    animation: l7 1.5s infinite;
}

@keyframes l7 {
    0% { background-position: 0 0, 0 100%, 100% 100%; }
    25% { background-position: 100% 0, 0 100%, 100% 100%; }
    50% { background-position: 100% 0, 0 0, 100% 100%; }
    75% { background-position: 100% 0, 0 0, 0 100%; }
    100% { background-position: 100% 100%, 0 0, 0 100%; }
}

#invisible-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 60vh;
    min-height: 400px;
    background-color: transparent;
    z-index: 999999;
    cursor: default;
    display: block;
}

@media (max-width: 850px) and (orientation: landscape) {
    #stream-list {
        bottom: 20px;
        right: 20px;
        left: auto;
        transform: none;
        flex-direction: column;
        width: 70px;
        max-height: 60%;
        overflow-y: auto;
        overflow-x: hidden;
        border-radius: 15px;
    }
    
    .stream-item {
        margin-bottom: 5px;
    }
    
    #player-container {
        height: 100vh;
    }
    
    #schedule-section {
        display: none;
    }
    
    #invisible-layer {
        height: 100vh;
    }
}

@media (max-width: 768px) {
    #player-container {
        height: 50vh;
        min-height: 300px;
    }
    
    #schedule-section h1 {
        font-size: 22px;
    }
    
    .match-teams {
        font-size: 16px;
    }
}