* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #000;
}

#game-container {
    position: relative;
    width: 100%;
    height: 100%;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* Loading Screen */
#loading-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    color: #fff;
}

.loader {
    border: 5px solid #333;
    border-top: 5px solid #f3f3f3;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 20px 0;
}

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

/* Start Screen */
#start-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('assets/textures/background.jpg');
    background-size: cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 90;
    color: #fff;
    display: none;
}

#start-screen h1 {
    font-size: 3rem;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px #000;
}

.input-container {
    margin-bottom: 1.5rem;
    text-align: center;
}

.input-container label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.input-container input {
    padding: 0.8rem;
    font-size: 1rem;
    border-radius: 5px;
    border: none;
    width: 250px;
    text-align: center;
}

button {
    background-color: #8b0000;
    color: white;
    border: none;
    padding: 12px 24px;
    margin: 10px;
    font-size: 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #a52a2a;
}

/* Game UI */
#game-ui {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
    color: #fff;
    font-size: 1.2rem;
    text-shadow: 2px 2px 4px #000;
    display: none;
}

#lives-container {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

#lives-icons {
    display: flex;
    margin-left: 10px;
}

.life-icon {
    width: 25px;
    height: 25px;
    margin-right: 5px;
    background-image: url('assets/textures/heart.png');
    background-size: contain;
    background-repeat: no-repeat;
}

/* Game Over Screen */
#game-over-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 80;
    color: #fff;
    display: none;
}

#game-over-screen h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #ff0000;
}

/* Leaderboard Screen */
#leaderboard-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 70;
    color: #fff;
    display: none;
}

#leaderboard-list {
    width: 80%;
    max-width: 500px;
    margin: 20px 0;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    max-height: 60vh;
    overflow-y: auto;
}

.leaderboard-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.leaderboard-item:last-child {
    border-bottom: none;
}

/* Instructions Screen */
#instructions-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 60;
    color: #fff;
    display: none;
}

.instructions-content {
    width: 80%;
    max-width: 600px;
    margin: 20px 0;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    max-height: 60vh;
    overflow-y: auto;
}

.instructions-content p, .instructions-content ul {
    margin-bottom: 15px;
}

.instructions-content ul {
    padding-left: 20px;
}

/* Controls */
#joystick-container {
    position: absolute;
    bottom: 100px;
    left: 100px;
    width: 120px;
    height: 120px;
    z-index: 20;
    display: none;
}

#attack-button {
    position: absolute;
    bottom: 100px;
    right: 100px;
    width: 80px;
    height: 80px;
    background-color: rgba(139, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20;
    display: none;
}

#attack-button img {
    width: 60%;
    height: 60%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #start-screen h1 {
        font-size: 2rem;
    }
    
    .input-container input {
        width: 200px;
    }
    
    #joystick-container {
        bottom: 50px;
        left: 50px;
    }
    
    #attack-button {
        bottom: 50px;
        right: 50px;
    }
} 