/* styles.css - Precision layout with side-controls for landscape mode */
body {
    margin: 0;
    background-color: #0b0b0b;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    overflow-x: hidden;
}

.container { 
    text-align: center; 
    width: 100%;
    max-width: 1400px;
    padding: 10px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Beautiful restored button styling with glowing states */
button {
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    color: #00ffcc;
    border: 1px solid #00ffcc;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0, 255, 204, 0.1);
    transition: all 0.2s ease;
}

button:hover {
    background: #00ffcc;
    color: #000;
    box-shadow: 0 4px 15px rgba(0, 255, 204, 0.4);
    transform: translateY(-1px);
}

button.active {
    background: #00ffcc;
    color: #000;
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.6);
}

.controls {
    margin-bottom: 10px;
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Portrait mode guardrails */
@media screen and (orientation: portrait) {
    #btn-basketball, #btn-sumo, #btn-fullscreen {
        display: none !important;
    }
}

/* Landscape mode: Move controls to the side/bottom cleanly to prevent vertical cropping */
@media screen and (orientation: landscape) and (max-width: 1024px) {
    .container {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 15px;
    }
    .controls {
        flex-direction: column;
        order: 2;
    }
    .viewport-wrapper {
        order: 1;
        max-height: 80vh;
    }
}

.viewport-wrapper {
    background: #000;
    border: 2px solid #222;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    width: 100%;
    max-width: 1280px;
    aspect-ratio: 16 / 9;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

canvas { 
    width: 100% !important;
    height: 100% !important;
    object-fit: contain; /* Prevents pan-and-scan distortion */
    display: block; 
}

.player-controls {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    order: 3;
}

input[type="range"] {
    width: 280px;
    max-width: 100%;
    accent-color: #00ffcc;
    cursor: pointer;
}

.site-nav {
    margin-top: 15px;
    display: flex;
    gap: 20px;
    justify-content: center;
    font-size: 13px;
    order: 4;
}

.site-nav a {
    color: #00ffcc;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.site-nav a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Completely hide raw source video so no ghost/duplicate feed appears */
#source-video {
    display: none !important;
}