/* --- Game Reset & Body Styles --- */
body {
    font-family: 'Press Start 2P', cursive, sans-serif;
    background-color: #222;
    color: #fff;
    margin: 0;
    padding: 20px;
    text-align: center;
}

h1 {
    font-size: 24px;
    margin-bottom: 10px;
}

#instructions {
    font-size: 12px;
    margin-bottom: 20px;
    color: #ccc;
}

#game-container {
    position: relative;
    width: 800px;
    height: 600px;
    margin: 0 auto;
    border: 4px solid #f0f0f0;
    overflow: hidden;
    background-image: url('images/seattle-background-8bit.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#fireworksCanvas {
    pointer-events: none;
}

/* --- Start Overlay --- */
#start-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

#startButton {
    font-family: 'Press Start 2P', cursive;
    padding: 10px 15px;
    font-size: 14px;
    cursor: pointer;
    background-color: #f0f0f0;
    border: 3px solid #333;
    color: #333;
    box-shadow: 4px 4px 0 #000;
    transition: all 0.1s ease;
}

#startButton:hover {
    background-color: #ddd;
}

#startButton:active {
    box-shadow: 2px 2px 0 #000;
    transform: translate(2px, 2px);
}

#startButton:disabled {
    background-color: #999;
    color: #555;
    cursor: not-allowed;
    box-shadow: none;
}

/* --- Power Bar --- */
#power-bar-container {
    display: none;
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 20;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 8px 12px;
    border: 3px solid #f0f0f0;
    color: #f0f0f0;
    font-size: 10px;
    box-shadow: 4px 4px 0px #000;
    transition: box-shadow 0.2s ease;
}

#power-bar-label {
    display: block;
    margin-bottom: 5px;
    text-shadow: 1px 1px #000;
}

#power-bar-visual {
    width: 100px;
    height: 15px;
    background-color: #222;
    border: 2px solid #f0f0f0;
    overflow: hidden;
}

#power-bar-fill {
    width: 0%;
    height: 100%;
    background-color: #C46210;
    transition: width 0.3s ease-in-out;
}

#power-bar-container.flash-glow {
    box-shadow: 0 0 15px 5px rgba(255, 255, 100, 0.8), 4px 4px 0px #000;
    animation: pulse 0.5s 1;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* --- Modals --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 20;
}

.modal-content {
    background: #fff;
    color: #333;
    padding: 40px;
    border: 4px solid #000;
    max-width: 700px;
    width: 90%;
    position: relative;
    font-family: 'Source Sans Pro', sans-serif;
    box-shadow: 8px 8px 0 #000;
}

.modal-close-button {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    font-family: sans-serif;
}

.modal-text-content h2 {
    font-family: 'Press Start 2P', cursive;
    font-size: 16px;
    margin-top: 0;
    margin-bottom: 20px;
}

.modal-text-content p {
    font-size: 16px;
    margin-bottom: 15px;
    line-height: 1.6;
}

.modal-text-content a {
    color: #0066cc;
}

.flex-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.image-content {
    flex: 1;
    text-align: center;
}

.image-content img {
    max-width: 100%;
    border: 4px solid #333;
    box-shadow: 4px 4px 0 #000;
}

.text-content {
    flex: 2;
    text-align: left;
}

.warp-btn {
    display: inline-block;
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    padding: 10px 15px;
    background: #f0f0f0;
    border: 3px solid #333;
    color: #333;
    text-decoration: none;
    box-shadow: 4px 4px 0 #000;
    margin-top: 10px;
}

.warp-btn:active {
    box-shadow: 2px 2px 0 #000;
    transform: translate(2px, 2px);
}

/* --- Carousel --- */
#carousel-container {
    display: none;
    position: relative;
    margin-top: 20px;
}

.carousel-slides {
    overflow: hidden;
    background: #f9f9f9;
    border: 2px solid #ddd;
}

.carousel-slide {
    display: none;
    padding: 20px;
}

.carousel-slide.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

.prev-slide,
.next-slide {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    padding: 10px 15px;
    user-select: none;
    border: none;
}

.prev-slide {
    left: 0;
}

.next-slide {
    right: 0;
}

.prev-slide:hover,
.next-slide:hover {
    background: rgba(0, 0, 0, 0.8);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}