* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    margin: 0;
    padding: 0;
    background: #0f0f0f;
    color: #e0e0e0;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

h1 {
    text-align: center;
    color: #fff;
    margin-bottom: 2rem;
    font-size: 2rem;
}

#videoPlayer {
    margin-bottom: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}

video {
    width: 100%;
    height: auto;
    display: block;
}

/* Stats Panel */
.stats-panel {
    background: #1a1a1a;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #2a2a2a;
}

.stats-panel h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #fff;
    font-size: 1.1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-item {
    background: #0a0a0a;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #2a2a2a;
}

.stat-label {
    color: #999;
    font-size: 0.9rem;
}

.stat-value {
    color: #fff;
    font-weight: bold;
    font-size: 1.1rem;
}

/* Stats Chart */
.stats-chart {
    margin-top: 1rem;
}

.chart-bar {
    display: grid;
    grid-template-columns: 80px 1fr 60px;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.chart-label {
    color: #999;
    font-size: 0.9rem;
    text-align: right;
}

.chart-progress {
    background: #0a0a0a;
    height: 24px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #2a2a2a;
}

.chart-bar-fill {
    height: 100%;
    transition: width 0.3s ease;
}

.server-bar {
    background: linear-gradient(90deg, #ff6b6b, #ff8787);
}

.p2p-bar {
    background: linear-gradient(90deg, #51cf66, #69db7c);
}

.chart-value {
    color: #fff;
    font-weight: bold;
    font-size: 0.9rem;
}

/* Form Styling */
form {
    background: #1a1a1a;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #2a2a2a;
    margin-bottom: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: #e0e0e0;
    font-weight: 500;
}

input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    background: #0a0a0a;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    color: #fff;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    transition: border-color 0.2s;
}

input[type="text"]:focus {
    outline: none;
    border-color: #51cf66;
}

button {
    background: linear-gradient(90deg, #51cf66, #69db7c);
    color: #000;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(81, 207, 102, 0.3);
}

button:active {
    transform: translateY(0);
}

/* Status Messages */
.status {
    text-align: center;
    padding: 0.75rem;
    border-radius: 6px;
    margin-top: 1rem;
}

.status-loading {
    color: #69db7c;
}

.status-error {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    padding: 0.75rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.status-success {
    color: #51cf66;
}

/* Responsive Design */
@media (max-width: 600px) {
    .container {
        padding: 1rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .chart-bar {
        grid-template-columns: 70px 1fr 50px;
        gap: 0.5rem;
    }

    button {
        padding: 0.75rem 1.5rem;
    }
}
