:root {
    --bg-color: #0f0f11;
    --text-color: #ffffff;
    --accent-color: #04AFE3; /* CHEK+ Brand Color */
    --overlay-bg: rgba(0, 0, 0, 0.85);
    
    /* Skin Shaka Player native UI */
    --shaka-theme-color: var(--accent-color) !important;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body, html {
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    overflow: hidden; /* Prevent scrolling since it's a full-screen player */
}

/* Header overlay */
.header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
    padding: 15px 20px;
    pointer-events: none; /* Let clicks pass through to video */
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    pointer-events: auto; /* Re-enable clicks for links */
}

.header-label {
    font-weight: bold;
    font-size: 1.2rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

.fallback-link {
    color: #ccc;
    text-decoration: none;
    font-size: 0.9rem;
    background: rgba(255,255,255,0.1);
    padding: 5px 10px;
    border-radius: 4px;
    transition: background 0.2s;
}

.fallback-link:hover {
    background: rgba(255,255,255,0.2);
    color: white;
}

/* Player container */
.player-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#video-container {
    width: 100%;
    height: 100%;
    position: relative;
    background-color: #000;
}

#video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Overlays */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--overlay-bg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 20;
    text-align: center;
    padding: 20px;
}

.overlay.hidden {
    display: none !important;
}

/* Spinner */
.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    border-top-color: var(--accent-color);
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Errors */
.error-title {
    color: var(--accent-color);
    margin-bottom: 10px;
    font-size: 1.5rem;
}

#error-message {
    margin-bottom: 20px;
    max-width: 400px;
}

.btn {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 10px 24px;
    font-size: 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn:hover {
    background-color: #039bd0;
}

.error-details {
    margin-top: 20px;
    text-align: left;
    background: rgba(0,0,0,0.5);
    padding: 10px;
    border-radius: 4px;
    max-width: 80%;
}

.error-details summary {
    cursor: pointer;
    color: #aaa;
    font-size: 0.9rem;
}

.error-details pre {
    margin-top: 10px;
    font-size: 0.8rem;
    color: #ff9999;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Big Play Button (Autoplay fallback) */
.btn-play {
    background: rgba(255,255,255,0.2);
    border: 2px solid white;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    color: white;
    transition: transform 0.2s, background 0.2s;
}

.btn-play:hover {
    transform: scale(1.1);
    background: rgba(255,255,255,0.3);
}
