﻿* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

html, body {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #072a5a 0%, #001026 100%);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #ffffff;
}

#game-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: min(100vw, calc(100vh * (9 / 16)));
    max-height: 100vh;
    aspect-ratio: 9 / 16;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #001026;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
    overflow: hidden;
}

#canvas {
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    max-height: 100%;
    display: block;
    outline: none;
    border: none;
    visibility: hidden;
}

#loadingOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #021a38 0%, #001026 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    transition: opacity 0.3s ease-out;
}

#loadingTitle {
    font-weight: 800;
    font-size: 20px;
    letter-spacing: 1px;
    color: #ffffff;
    margin-top: 20px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

#loadingStatus {
    font-size: 14px;
    color: #79a8d7;
    margin-top: 8px;
}

#progressTrack {
    width: 220px;
    height: 6px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    margin-top: 18px;
    overflow: hidden;
}

#progressBar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #0d6efd, #ff3b30);
    border-radius: 3px;
    transition: width 0.2s ease;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.15);
    border-top: 4px solid #0d6efd;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

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