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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #000;
    font-family: 'Arial', sans-serif;
}

#game-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#video {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Hidden - we draw it mirrored onto the canvas instead */
    visibility: hidden;
}

#canvas {
    position: absolute;
    width: 100%;
    height: 100%;
    /* No transform - we'll mirror video content in JS instead */
}

/* Hide video controls on mobile */
video::-webkit-media-controls {
    display: none !important;
}

/* Prevent text selection */
body {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* Prevent pull-to-refresh on mobile */
body {
    overscroll-behavior: none;
}

/* Inline submit form (shown on game over screen) */
.submit-form {
    position: absolute;
    bottom: 25%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 100;
}

.submit-form.hidden {
    display: none;
}

#name-input {
    padding: 10px 14px;
    font-size: 16px;
    border: 2px solid #444;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: #FFF;
    text-align: center;
    outline: none;
    width: 150px;
}

#name-input:focus {
    border-color: #FFD700;
}

#name-input::placeholder {
    color: #888;
}

#submit-btn {
    padding: 10px 16px;
    font-size: 14px;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: #FFD700;
    color: #000;
    transition: transform 0.1s, background 0.1s;
}

#submit-btn:hover {
    background: #FFC000;
}

#submit-btn:active {
    transform: scale(0.95);
}

#submit-btn:disabled {
    background: #666;
    color: #999;
    cursor: not-allowed;
}

/* Play again button */
.play-again-btn {
    position: absolute;
    bottom: 15%;
    left: 50%;
    transform: translateX(-50%);
    padding: 14px 32px;
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    background: #4CAF50;
    color: #FFF;
    z-index: 100;
    transition: transform 0.1s, background 0.1s;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.play-again-btn:hover {
    background: #45a049;
}

.play-again-btn:active {
    transform: translateX(-50%) scale(0.95);
}

.play-again-btn.hidden {
    display: none;
}
