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

html, body {
    width: 100%;
    height: 100%;
    background: #050505;
    font-family: "Segoe UI", sans-serif;
}

/* Wrapper fullscreen */
#player-wrapper {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

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

/* Vídeo */
#video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

/* Botão de Start (triângulo dourado com borda fina branca) */
#start-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: none;
    border: none;
    cursor: pointer;
    z-index: 50;
    display: none;
    padding: 0;
}
#start-btn svg polygon {
    fill: #ffd700;
    stroke: #fff;
    stroke-width: 0.5;
}
#start-btn:hover svg polygon {
    transform: scale(1.1);
    transition: transform 0.15s ease;
}
#start-btn:active svg polygon {
    transform: scale(0.95);
    opacity: 0.9;
}

/* Loading Overlay */
#loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(5,5,5,0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 20;
}

/* Spinner (GPU friendly) */
.loader {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: conic-gradient(#ffd700, rgba(255,215,0,0.1));
    animation: spin 0.9s linear infinite;
    margin-bottom: 12px;
}

.loading-text {
    color: #ffd700;
    font-size: 14px;
    opacity: 0.85;
}

/* GPU friendly animation */
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Controls wrapper */
#controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;

    display: flex;
    align-items: center;
    gap: 12px;

    padding: 10px 14px;
    background: linear-gradient(to top, rgba(0,0,0,0.75), transparent);

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 40;
}

/* Show controls */
#video-container.show-controls #controls {
    opacity: 1;
    pointer-events: auto;
}

/* Buttons */
#controls button {
    background: none;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    padding: 6px;
}

/* Progress bar */
#progress {
    flex: 1;
    height: 4px;
    cursor: pointer;
    accent-color: #e50914; /* Netflix red */
}

/* Mobile tweaks for controls */
@media (max-width: 768px) {
    #controls {
        padding: 8px 12px;
        gap: 8px;
        font-size: 16px;
    }

    #controls button {
        font-size: 16px;
        padding: 4px;
    }

    #progress {
        height: 3px;
    }

    #start-btn svg {
        width: 100px;
        height: 100px;
    }
}