:root {
    --bg-color: #0d0d0d;
    --text-color: #ffffff;
    --accent-color: #e50914;
    /* Netflix-like red for focus */
    --surface-color: #1f1f1f;
    --input-bg: #333;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

/* TV & Remote Focus Styles */
:focus {
    outline: 4px solid var(--accent-color);
    outline-offset: 4px;
    border-radius: 4px;
}

/* Admin Panel Styles */
.admin-container {
    width: 90%;
    max-width: 600px;
    padding: 2rem;
    background-color: var(--surface-color);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    text-align: center;
}

h1 {
    margin-bottom: 2rem;
    font-weight: 700;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    color: #aaa;
}

/* Scoped to Admin Container to not break Video.js inputs/buttons */
.admin-container input[type="text"],
.admin-container input[type="password"],
.admin-container select {
    width: 100%;
    padding: 1rem;
    font-size: 1.2rem;
    background-color: var(--input-bg);
    border: 2px solid transparent;
    border-radius: 50px;
    color: white;
    box-sizing: border-box;
}

.admin-container button {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.4);
}

.admin-container button:hover,
.admin-container button:focus {
    transform: scale(1.02);
}

.message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
}

.success {
    background-color: rgba(0, 255, 0, 0.1);
    color: #4ade80;
}

.error {
    background-color: rgba(255, 0, 0, 0.1);
    color: #f87171;
}

/* Player Specifics */
#video-container {
    width: 100%;
    height: 100vh;
    background: black;
    display: flex;
    justify-content: center;
    align-items: center;
}

.video-js {
    width: 100%;
    height: 100%;
}

/* Minimalist Video.js Skin Overrides */
.video-js .vjs-big-play-button {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border: none;
    background-color: rgba(229, 9, 20, 0.9);
    /* Netflix Red */
    border-radius: 50%;
    /* Circle */
    width: 3em;
    height: 3em;
    line-height: 3em;
    font-size: 1.5em;
    /* Slightly smaller icon relative to button */
    margin: 0;
}

/* Control Bar Styling - Safer Approach */
.video-js .vjs-control-bar {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    background-color: transparent;
    height: 5em;
    width: 100%;

    /* Physically lift the bar up from the bottom edge (Portrait / Default) */
    /* Increased to 4em for "a bit more up" */
    bottom: calc(4em + env(safe-area-inset-bottom));
    padding-bottom: 0;

    display: flex;
    /* Ensure flex is active */
    align-items: center;
    /* Vertically center items */
}

/* Landscape Optimization: Move controls down to save space */
@media (orientation: landscape) {
    .video-js .vjs-control-bar {
        /* In landscape, we often want full screen real estate */
        bottom: env(safe-area-inset-bottom);
    }
}

/* Make icons larger but keep layout intact */
.video-js .vjs-button>.vjs-icon-placeholder:before {
    font-size: 2.2em;
    line-height: 1.8;
}

/* Progress Control - Standard Position but thicker */
.video-js .vjs-progress-control {
    position: absolute;
    width: 100%;
    height: 1em;
    top: -1em;
    /* Float just above the bar */
    background: rgba(0, 0, 0, 0.3);
    /* Subtle backdrop */
}

.video-js .vjs-play-progress,
.video-js .vjs-volume-level {
    background-color: var(--accent-color);
}

.video-js .vjs-slider {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Ensure time display has space */
.video-js .vjs-time-control {
    font-size: 1.1em;
    padding: 0 5px;
    display: block !important;
    /* Force visible */
}

/* Fix for volume panel overlap */
.video-js .vjs-volume-panel {
    margin-right: 10px;
}

/* Force spacer to take available width */
.video-js .vjs-spacer,
.video-js .vjs-custom-control-spacer {
    display: flex;
    flex: 1 1 auto;
}