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

body {
    background-color: #000;
    font-family: 'Arial', sans-serif;
    overflow: hidden;
    touch-action: none;
}

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

#game-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

#loading-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.loading-content {
    text-align: center;
    color: #fff;
}

.loading-content h1 {
    font-size: 3rem;
    margin-bottom: 2rem;
    font-family: 'Times New Roman', serif;
    letter-spacing: 0.5rem;
    color: #8a0303;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

.loading-sword {
    width: 80%;
    height: 20px;
    background-color: #222;
    margin: 0 auto 1rem;
    border: 2px solid #444;
    position: relative;
    overflow: hidden;
}

.loading-progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #8a0303, #ff0000);
    transition: width 0.3s ease;
}

.loading-content p {
    font-size: 1rem;
    color: #aaa;
}

#mobile-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30vh;
    display: flex;
    z-index: 5;
}

#joystick-area {
    flex: 1;
    position: relative;
}

#joystick-base {
    position: absolute;
    bottom: 20%;
    left: 20%;
    width: 100px;
    height: 100px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#joystick-thumb {
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
}

#action-buttons {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    padding-right: 20px;
    padding-bottom: 20px;
}

#action-buttons button {
    width: 70px;
    height: 70px;
    margin: 5px;
    border-radius: 50%;
    background-color: rgba(138, 3, 3, 0.7);
    color: white;
    border: 2px solid #ff0000;
    font-weight: bold;
    font-size: 0.8rem;
}

.hidden {
    display: none !important;
}

@media (max-width: 768px) {
    .loading-content h1 {
        font-size: 2rem;
    }
    
    .loading-sword {
        width: 90%;
    }
}
