/* ============================================
   🔥 PALITO FIGHTER — Game Styles
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #0a0a0f;
    font-family: 'Press Start 2P', monospace;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

@media (hover: hover) {
    html, body { cursor: none; }
}

/* --- Game Container --- */
#game-container {
    width: 100vw;
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: none;
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* --- Loading Screen --- */
#loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, #1a0a2e 0%, #0a0a0f 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: opacity 0.8s ease-out;
}

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

.loading-text {
    color: #ff6a00;
    font-size: 14px;
    letter-spacing: 4px;
    margin-top: 40px;
    animation: pulse 1.5s ease-in-out infinite;
}

/* --- Flame Loader --- */
.flame-loader {
    width: 60px;
    height: 80px;
    position: relative;
}

.flame-inner {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 40px;
    background: #ffdd00;
    border-radius: 50% 50% 20% 20%;
    animation: flicker-inner 0.3s ease-in-out infinite alternate;
    box-shadow: 0 0 20px #ffdd00, 0 0 40px #ff8800, 0 0 60px #ff440088;
}

.flame-outer {
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 35px;
    height: 55px;
    background: linear-gradient(to top, #ff4400, #ff8800, #ffdd0088);
    border-radius: 50% 50% 20% 20%;
    animation: flicker-outer 0.5s ease-in-out infinite alternate;
    opacity: 0.7;
    z-index: -1;
}

/* --- Animations --- */
@keyframes flicker-inner {
    0% { height: 38px; width: 18px; }
    100% { height: 44px; width: 22px; }
}

@keyframes flicker-outer {
    0% { height: 52px; width: 32px; transform: translateX(-50%) skewX(-2deg); }
    100% { height: 58px; width: 38px; transform: translateX(-50%) skewX(2deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}
