body { background: #1e1e2e; color: #cdd6f4; font-family: system-ui, sans-serif; padding: 2rem; max-width: 800px; margin: 0 auto; }
h1, h2 { color: #89b4fa; }
h3 { color: #a6e3a1; margin-top: 2rem; }
a { color: #f38ba8; text-decoration: none; font-weight: bold; }
a:hover { text-decoration: underline; }
ul { background: #313244; padding: 1.5rem 2.5rem; border-radius: 12px; }
li { margin-bottom: 0.5rem; }

.status-box { border: 2px solid #89b4fa; padding: 1rem; border-radius: 8px; display: inline-block; background: #181825; }

/* --- Slot Stats --- */
.slot-stats { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 2rem; justify-content: flex-start; }
.slot-stats div {
    background: #313244; padding: 0.8rem 1.5rem; border-radius: 8px;
    font-size: 1.1rem; box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: flex; align-items: center; gap: 0.5rem; border: 1px solid #45475a;
}
.stat-label { color: #a6e3a1; font-weight: bold; }
.stat-value { color: #89b4fa; font-family: monospace; font-size: 1.2rem; background: #181825; padding: 0.2rem 0.6rem; border-radius: 4px; }

/* --- Dashboard UI --- */
.upload-box { background: #313244; padding: 2rem; border-radius: 12px; text-align: center; margin: 2rem 0; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }

/* The sleek, custom File Input */
input[type="file"] {
    font-family: monospace; color: #cdd6f4; background: #181825;
    padding: 0.5rem; border-radius: 8px; border: 1px solid #45475a;
    width: 100%; box-sizing: border-box; cursor: pointer;
    margin-bottom: 1.5rem; transition: border-color 0.2s;
}
input[type="file"]:hover { border-color: #89b4fa; }

/* Target the ugly browser 'Choose Files' button itself */
input[type="file"]::file-selector-button {
    background: #89b4fa; color: #1e1e2e;
    padding: 0.8rem 1.5rem; margin-right: 1rem;
    border-radius: 6px; border: none; cursor: pointer;
    font-weight: bold; font-family: inherit; font-size: 1rem;
    transition: filter 0.2s, transform 0.1s;
}
input[type="file"]::file-selector-button:hover {
    filter: brightness(1.1); transform: scale(1.02);
}

/* --- Progress Bar --- */
.progress-container { background: #181825; padding: 1.5rem; border-radius: 12px; margin-bottom: 2rem; display: flex; flex-direction: column; gap: 0.5rem; font-weight: bold; }
progress { width: 100%; height: 1.5rem; border-radius: 8px; overflow: hidden; }
progress::-webkit-progress-bar { background-color: #313244; }
progress::-webkit-progress-value { background-color: #a6e3a1; } /* Green progress */

/* --- Buttons --- */
.redirect-container { text-align: center; margin-top: 15vh; }
.btn-large {
    display: inline-block; background: #f38ba8; color: #1e1e2e;
    padding: 1rem 2rem; font-size: 1.2rem; font-weight: bold;
    border-radius: 8px; border: none; cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2); transition: transform 0.1s, filter 0.2s;
}
.btn-large:hover { filter: brightness(1.1); transform: scale(1.02); }

/* Mobile tweaks */
@media (max-width: 600px) {
    body { padding: 1rem; }
    .btn-large { width: 100%; padding: 1rem; }
}

/* ==========================================
   THE 60 FPS LIVE STREAM PLAYER
   ========================================== */
.stream-container {
    position: relative;
    background: #11111b; /* Darkest mantle crust */
    border: 2px solid #45475a;
    border-radius: 12px;
    overflow: hidden;
    margin: 2rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    aspect-ratio: 16 / 9; /* Lock it to standard video ratios */
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

#video-canvas {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #000;
}

#status-overlay {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(30, 30, 46, 0.85);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-family: monospace;
    font-weight: bold;
    font-size: 0.9rem;
    z-index: 10;
    border: 1px solid #45475a;
    color: #cdd6f4; /* Default text color before JS changes it */
    backdrop-filter: blur(4px);
}

/* --- Text Upload UI --- */
.text-area-input {
    width: 100%;
    margin-bottom: 1rem;
    border-radius: 8px;
    border: 1px solid #45475a;
    padding: 0.5rem;
    background: #181825;
    color: #cdd6f4;
    font-family: monospace;
    resize: vertical;
    box-sizing: border-box;
}

.text-area-input:focus {
    border-color: #89b4fa;
    outline: none;
}

.divider {
    margin: 2rem 0;
    border: 1px solid #45475a;
}
