body {
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #111;
    font-family: Arial, sans-serif;
    overflow: hidden;
    user-select: none;
}

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

#game-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    cursor: none;
}

#ui-overlay {
    position: absolute;
    top: 10px;
    left: 10px;
    width: calc(100% - 20px);
    color: white;
    font-size: 18px;
    text-shadow: 2px 2px 2px #000;
    z-index: 10;
    pointer-events: none;
    display: flex;
    justify-content: space-between;
}

.ui-panel {
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #3498db;
    border-radius: 5px;
    padding: 5px 10px;
    margin-bottom: 10px;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.7);
    flex: 1;
    max-width: 30%;
    text-align: center;
    font-family: 'Orbitron', 'Audiowide', sans-serif;
    letter-spacing: 1px;
    text-transform: uppercase;
    pointer-events: none;
    user-select: none;
}

#power-container {
    border-color: #3498db;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.7);
}

#lives-container {
    border-color: #2ecc71;
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.7);
}

#power-meter, #weapon-level {
    position: relative;
    height: 20px;
}

#boss-progress-container {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 15px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #f39c12;
    border-radius: 10px;
    overflow: hidden;
    z-index: 10;
    user-select: none;
}

#boss-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(to right, #f1c40f, #e74c3c);
    transition: width 1s;
}

#boss-progress-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: bold;
    text-shadow: 1px 1px 2px black;
}

:root {
    --power-width: 0%;
}

#power-meter:after {
    content: '';
    position: absolute;
    left: 0;
    top: 100%;
    height: 3px;
    width: var(--power-width); 
    background: linear-gradient(to right, #f39c12, #e74c3c);
    transition: width 0.3s;
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.7);
}

#start-screen, #game-over-screen {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    z-index: 20;
}

.hidden {
    display: none !important;
}

button {
    background-color: #4CAF50;
    border: none;
    color: white;
    padding: 15px 32px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 20px 0;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #45a049;
}

.music-btn {
    background-color: #3498db;
    margin: 5px;
    padding: 10px 20px;
}

.music-btn:hover {
    background-color: #2980b9;
}

.music-btn.selected {
    background-color: #e74c3c;
}

h1 {
    color: #fff;
    text-shadow: 0 0 5px #fff, 0 0 10px #ff0000;
}

#music-selection {
    margin: 20px 0;
    text-align: center;
}

#rules-button {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: #3498db;
    border: none;
    color: white;
    padding: 8px 15px;
    text-align: center;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    border-radius: 5px;
    opacity: 0.7;
    transition: opacity 0.3s;
    z-index: 100;
}

#rules-button:hover {
    opacity: 1;
}

#rules-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: #222;
    border: 3px solid #3498db;
    border-radius: 10px;
    width: 80%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 20px;
    color: white;
    position: relative;
    font-family: 'Orbitron', 'Audiowide', sans-serif;
}

.close-button {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 25px;
    cursor: pointer;
    color: #e74c3c;
}

.rules-section {
    margin-bottom: 20px;
}

.rules-section h3 {
    color: #3498db;
    border-bottom: 1px solid #3498db;
    padding-bottom: 5px;
}

.item-description {
    display: flex;
    align-items: center;
    margin: 10px 0;
}

.item-image {
    width: 30px;
    height: 30px;
    margin-right: 15px;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.item-image.blue, .item-image.red {
    border-radius: 5px;
    background: none;
}

.item-image.shield {
    background-color: #3498db;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.item-image.health {
    background-color: #2ecc71;
    position: relative;
}

.item-image.health:before, .item-image.health:after {
    content: '';
    position: absolute;
    background-color: #2ecc71;
}

.item-image.health:before {
    top: 20%;
    left: 40%;
    width: 20%;
    height: 60%;
}

.item-image.health:after {
    top: 40%;
    left: 20%;
    width: 60%;
    height: 20%;
}

.item-image.weapon {
    background-color: #f1c40f;
    clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
}

.item-image.weapon-part {
    background-color: #e67e22;
    clip-path: polygon(50% 20%, 80% 80%, 20% 80%);
}

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&family=Audiowide&display=swap');