/* Modernized CSS for OME Video Player */

html {
    box-sizing: border-box;
    line-height: 1.6;
    scroll-behavior: smooth;
    font-size: 16px;
}

*,
*:before,
*:after {
    box-sizing: inherit;
    margin: 0;
    padding: 0;
}

body {
    flex-direction: column;
    align-items: center;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Roboto', 'Segoe UI', Helvetica, Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    background-color: #f4f4f9;
    color: #333;
    padding: 1rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: bold;
    color: #222;
    margin-bottom: 1rem;
    text-align: center;
}

h2 {
    font-size: 1rem;
    color: #444;
    margin-bottom: 0.1rem;
    margin-top: 0.1rem;
    text-align: center;
}

#players {
    max-width: 100vw;
    max-height: 100vh;
    display: grid;
    grid-template-columns: repeat(auto-fit);
    gap: 1rem;
    margin-top: 2rem;
}
.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 90vw;
    margin: 0 auto;
}
.player {
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.player:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.player-container {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.player-container:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

#total-throughput {
    font-size: 1.125rem;
    color: #555;
    background: #fff;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
}

#button-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0;
    padding: 0.5rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stream-button {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.stream-button.active {
    background-color: #4caf50;
    color: #fff;
}

.stream-button.inactive {
    background-color: #ccc;
    color: #666;
}

/* Dark Mode Styles */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #121212;
        color: #e0e0e0;
    }

    h1 {
        color: #ffffff;
    }

    h2 {
        color: #cccccc;
    }

    #total-throughput {
        background: #1e1e1e;
        color: #bbbbbb;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    }

    .player-container {
        background: #1e1e1e;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    }

    .player-container:hover {
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.7);
    }

    .player {
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
    }

    .player:hover {
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.7);
    }

    #button-container {
        background: #1e1e1e;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    }

    .stream-button.active {
        background-color: #388e3c;
        color: #fff;
    }

    .stream-button.inactive {
        background-color: #555;
        color: #aaa;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1rem;
    }

    #total-throughput {
        font-size: 1rem;
    }
}
