#game-screen { padding: 0; }

#game-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: linear-gradient(180deg, #4ec0ca 0%, #70c5ce 50%, #87ceeb 100%);
    touch-action: manipulation;
    cursor: pointer;
}

#game-hud {
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    z-index: 10;
    pointer-events: none;
}

.hud-score {
    font-size: 48px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.hud-info { display: none; }

#game-area {
    position: absolute;
    inset: 0;
    overflow: visible;
}

#ground {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 112px;
    background:
        linear-gradient(180deg, #5eb031 0%, #5eb031 12px, transparent 12px),
        repeating-linear-gradient(90deg, #ded895 0px, #ded895 12px, #d9b866 12px, #d9b866 24px);
    border-top: 4px solid #543e2e;
    z-index: 5;
}

#ground::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 12px;
    background: linear-gradient(180deg, #5eb031, #3d7320);
}

.game-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0,0,0,0.5);
    z-index: 20;
    cursor: pointer;
}

.game-overlay.hidden {
    display: none;
    pointer-events: none;
}

.overlay-content {
    text-align: center;
    color: #fff;
    pointer-events: none;
}

.overlay-content h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
}

.overlay-content p {
    font-size: 14px;
    opacity: 0.8;
}

.countdown {
    font-size: 64px;
    font-weight: 700;
}

#waiting-overlay {
    background: rgba(0,0,0,0.7);
    cursor: default;
}

.waiting-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.waiting-spinner {
    width: 24px;
    height: 24px;
    margin: 16px auto 0;
    border: 2px solid rgba(255,255,255,0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

#live-score-panel {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0,0,0,0.6);
    border-radius: 8px;
    padding: 10px 12px;
    z-index: 10;
    min-width: 100px;
}

#live-score-panel.hidden { display: none; }

.live-score-title {
    font-size: 9px;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 6px;
}

.live-score-item {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 11px;
    color: rgba(255,255,255,0.9);
}

.live-score-item.me { color: #60a5fa; font-weight: 600; }
.live-score-item.dead { color: #ef4444; text-decoration: line-through; opacity: 0.6; }

.live-score-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 8px;
    max-width: 60px;
}

.live-score-value {
    font-weight: 600;
    min-width: 20px;
    text-align: right;
}

.score-popup {
    position: absolute;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    animation: scorePopup 0.3s ease-out forwards;
    pointer-events: none;
    z-index: 15;
}

@keyframes scorePopup {
    0% { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, -30px); }
}

@media (max-height: 600px) {
    #game-hud { top: 10px; }
    .hud-score { font-size: 32px; }
    #ground { height: 80px; }
}
