/* Game Screen Styles */
#game-screen {
    background: #000;
    flex-direction: column;
    padding: 0;
}

/* HUD (Heads Up Display) */
.hud {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.8), transparent);
    z-index: 1000;
    font-size: 1.1rem;
    font-weight: bold;
    pointer-events: none; /* Don't block game interactions */
}

.hud-left,
.hud-center,
.hud-right {
    flex: 1;
}

.hud-left {
    text-align: left;
    color: var(--secondary-accent);
}

.hud-center {
    text-align: center;
}

.hud-right {
    text-align: right;
    color: var(--primary-accent);
}

#lives-display {
    font-size: 1.3rem;
    letter-spacing: 2px;
    color: #FF0000;
    /* Force emoji to render as red on all devices */
    filter: none;
    -webkit-text-fill-color: #FF0000;
}

/* Game Canvas */
#game-canvas {
    display: block;
    margin: 0 auto;
    background: #000;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

/* Tutorial Overlay */
.tutorial-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.95);
    padding: var(--spacing-xl);
    border-radius: 16px;
    border: 3px solid var(--primary-accent);
    z-index: 10001;
    max-width: 500px;
    width: 85%;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.tutorial-content h3 {
    color: var(--primary-accent);
    margin-bottom: var(--spacing-md);
    font-size: 1.8rem;
}

.tutorial-content ul {
    list-style: none;
    padding: 0;
    margin-bottom: var(--spacing-md);
}

.tutorial-content li {
    padding: 0.6rem 0;
    font-size: 1.1rem;
    line-height: 1.8;
}

.tutorial-content li::before {
    content: '• ';
    color: var(--secondary-accent);
    font-weight: bold;
}

.tutorial-timer {
    text-align: center;
    margin-top: var(--spacing-sm);
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Mobile Touch Controls */
.mobile-controls {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--spacing-md);
    z-index: 9999; /* Above everything */
    pointer-events: none; /* Allow taps to pass through empty space */
}

.controls-left,
.controls-right {
    pointer-events: all; /* But capture taps on buttons */
}

.controls-left {
    position: absolute;
    left: var(--spacing-md);
    bottom: var(--spacing-md);
    display: flex;
    gap: var(--spacing-sm);
}

.controls-right {
    position: absolute;
    right: var(--spacing-md);
    bottom: var(--spacing-md);
}

.control-btn {
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid var(--secondary-accent);
    color: var(--text-light);
    font-size: 1.5rem;
    font-weight: bold;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.1s ease;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    min-width: 60px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:active {
    background: rgba(0, 255, 255, 0.3);
    border-color: var(--primary-accent);
    transform: scale(0.95);
}

.control-btn-jump {
    min-width: 100px;
    min-height: 70px;
    font-size: 1.2rem;
    background: rgba(255, 0, 255, 0.4);
    border-color: var(--primary-accent);
}

.control-btn-jump:active {
    background: rgba(255, 0, 255, 0.7);
}

/* Always show mobile controls on small screens */
@media (max-width: 1023px) {
    .mobile-controls {
        display: block !important;
    }
}

/* Show mobile controls on touch devices */
@media (hover: none) and (pointer: coarse) {
    .mobile-controls {
        display: block !important;
    }
}

/* Mobile landscape adjustments */
@media (max-width: 767px) and (orientation: landscape) {
    .hud {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }

    #lives-display {
        font-size: 1rem;
    }

    .mobile-controls {
        display: block;
    }

    .control-btn {
        min-width: 50px;
        min-height: 50px;
        font-size: 1.2rem;
    }

    .control-btn-jump {
        min-width: 80px;
        min-height: 60px;
        font-size: 1rem;
    }

    .tutorial-overlay {
        width: 90%;
        max-width: 450px;
        padding: var(--spacing-lg);
    }

    .tutorial-content h3 {
        font-size: 1.5rem;
    }

    .tutorial-content li {
        font-size: 1rem;
    }
}
