:root {
    --bg-color: #0d0d1a;
    --primary-color: #00ffcc;
    --secondary-color: #ff0055;
    --text-color: #ffffff;
    --classic-font: 'Press Start 2P', cursive;
}

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

body {
    background-color: #050505;
    color: var(--text-color);
    font-family: var(--classic-font);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

#game-container {
    position: relative;
    width: 800px;
    height: 600px;
    border: 4px solid #333;
    box-shadow: 0 0 30px rgba(0, 255, 204, 0.2);
    background-color: var(--bg-color);
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: pixelated; /* 重要: ピクセルアートをくっきりさせる */
}

#ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    padding: 20px;
}

#hud {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    text-shadow: 2px 2px #000;
}

.hud-item {
    padding: 10px;
}

#boss-hud {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    text-align: center;
    transition: opacity 0.5s;
}

.boss-label {
    font-size: 10px;
    margin-bottom: 5px;
    color: var(--secondary-color);
}

.boss-health-bar {
    width: 100%;
    height: 10px;
    background-color: #333;
    border: 2px solid #555;
    padding: 1px;
}

#boss-health-fill {
    width: 100%;
    height: 100%;
    background-color: var(--secondary-color);
    transition: width 0.1s;
}

#screen-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    background: rgba(0, 0, 0, 0.7);
    padding: 40px;
    border-radius: 8px;
    border: 2px solid var(--primary-color);
    min-width: 400px;
}

#msg-title {
    font-size: 32px;
    margin-bottom: 30px;
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-color);
}

#msg-info {
    display: flex;
    justify-content: space-around;
    gap: 40px;
    margin-bottom: 40px;
    text-align: left;
}

.info-group h3 {
    font-size: 14px;
    color: var(--secondary-color);
    margin-bottom: 15px;
    border-bottom: 1px solid #444;
    padding-bottom: 5px;
}

.info-group p {
    font-size: 10px;
    line-height: 1.8;
    color: #ddd;
}

#msg-sub {
    font-size: 14px;
    color: #fff;
    animation: blink 1s infinite;
    letter-spacing: 2px;
}

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

.hidden {
    display: none !important;
}
