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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #0a0a1a;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #e0e0e0;
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

#app {
    width: 100%;
    height: 100%;
}

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

#gpuCanvas {
    width: 100%;
    height: 100%;
    display: block;
    cursor: grab;
}

#gpuCanvas:active {
    cursor: grabbing;
}

/* HUD overlay */
#hud {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 16px 20px;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hud-title {
    font-size: 18px;
    font-weight: 700;
    color: #00d4ff;
    text-shadow: 0 0 12px rgba(0, 212, 255, 0.5);
    letter-spacing: 1px;
}

.hud-stat {
    font-size: 13px;
    font-family: 'Cascadia Code', 'Fira Code', monospace;
    color: #8ec8e8;
    opacity: 0.9;
}

.hud-hint {
    margin-top: 4px;
    font-size: 11px;
    color: #667;
    opacity: 0.7;
}

/* Loading state */
.loading-progress {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
}

.loading-progress circle {
    fill: none;
    stroke: #00d4ff;
    stroke-width: 3;
}

.loading-progress circle:last-child {
    stroke: #0a0a1a;
    stroke-dasharray: calc(3.141 * 80%);
    transform-origin: 50% 50%;
    animation: loading-spin 1.2s linear infinite;
}

@keyframes loading-spin {
    100% { transform: rotate(360deg); }
}

.loading-progress-text {
    position: absolute;
    top: calc(50% + 70px);
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
    color: #00d4ff;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    width: 100%;
    background: #a00;
    color: white;
    padding: 10px;
    text-align: center;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    margin-left: 16px;
    color: white;
    text-decoration: none;
}

@media (max-width: 600px) {
    .hud-title { font-size: 15px; }
    .hud-stat { font-size: 11px; }
    .hud-hint { font-size: 10px; }
    #hud { padding: 10px 14px; }
}
