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

body {
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
}

#game-container {
    position: relative;
    width: 780px;
    height: 480px;
    border: 3px solid #00d100;
    border-radius: 4px;
    box-shadow: 0 0 30px rgba(0, 209, 0, 0.3);
}

#gameCanvas {
    display: block;
    background: #111;
    image-rendering: pixelated;
}

#loading-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #0a0a0a 0%, #1a1a2e 50%, #0a0a0a 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    transition: opacity 0.5s;
}

#loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

#loading-screen h1 {
    font-size: 48px;
    color: #00d100;
    text-shadow: 0 0 20px rgba(0, 209, 0, 0.6);
    letter-spacing: 8px;
    margin-top: 20px;
}

#loading-screen h2 {
    font-size: 24px;
    color: #fff;
    letter-spacing: 12px;
    margin-top: 4px;
    opacity: 0.8;
}

.loading-logo {
    margin-bottom: 10px;
}

.omnitrix-loading {
    width: 80px;
    height: 80px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.omnitrix-ring {
    position: absolute;
    width: 80px;
    height: 80px;
    border: 4px solid #00d100;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.omnitrix-core {
    font-size: 28px;
    font-weight: bold;
    color: #00d100;
    text-shadow: 0 0 10px rgba(0, 209, 0, 0.8);
}

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

.loading-bar-container {
    width: 300px;
    height: 8px;
    background: #333;
    border-radius: 4px;
    margin-top: 30px;
    overflow: hidden;
}

.loading-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #00d100, #00ff00);
    border-radius: 4px;
    transition: width 0.3s;
}

#loading-text {
    color: #888;
    margin-top: 10px;
    font-size: 14px;
}

@media (max-width: 800px) {
    #game-container {
        width: 100vw;
        height: calc(100vw * 480 / 780);
        border: none;
        border-radius: 0;
    }

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