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

body {
    background-color: #0a192f;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-family: Arial, sans-serif;
}

#game-container {
    position: relative;
    width: 1000px;
    height: 800px;
}

#gameCanvas {
    background: linear-gradient(45deg, #507ab8, #172a45);
    width: 100%;
    height: 100%;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(97, 255, 218, 0.2);
}

#ui-overlay {
    position: absolute;
    top: 10px;
    left: 10px;
    color: white;
}

#health-bar {
    width: 200px;
    height: 20px;
    background-color: #333;
    border: 2px solid #666;
    margin-top: 10px;
    position: relative;
}

#health-fill {
    width: 100%;
    height: 100%;
    background-color: #2ecc71;
    transition: width 0.3s ease;
}

#health-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 0.8em;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    z-index: 1;
    white-space: nowrap;
}

#level-up-screen {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.9);
    padding: 20px;
    border-radius: 10px;
    color: white;
    text-align: center;
}

#card-container {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.card {
    width: 150px;
    height: 200px;
    background-color: #094179;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s;
}

.card:hover {
    transform: scale(1.05);
}

#game-over-screen {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.9);
    padding: 20px;
    border-radius: 10px;
    color: white;
    text-align: center;
}

.hidden {
    display: none;
}

#restart-button {
    padding: 10px 20px;
    background-color: #2ecc71;
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    margin-top: 20px;
}

#restart-button:hover {
    background-color: #27ae60;
}

#intro-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #1a1a1a;
    color: white;
}

#intro-screen h1 {
    font-size: 4em;
    margin-bottom: 30px;
    color: #2ecc71;
    text-shadow: 0 0 10px rgba(46, 204, 113, 0.5);
}

#play-button {
    padding: 15px 40px;
    font-size: 1.5em;
    background-color: #2ecc71;
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
}

#play-button:hover {
    transform: scale(1.1);
    background-color: #27ae60;
}

#lives {
    margin-bottom: 5px;
    font-weight: bold;
    color: #e74c3c;
}

.card {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    font-size: 1.2em;
    color: white;
    text-align: center;
}

@media (max-width: 1200px) {
    #game-container {
        width: 100vw;
        height: 100vh;
    }
    
    .card {
        width: 120px;
        height: 160px;
        font-size: 1em;
    }
}