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

body {
    font-family: 'Courier New', monospace;
    background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
    color: #fff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.game-container {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.3);
    max-width: 900px;
    width: 100%;
}

.header {
    text-align: center;
    margin-bottom: 20px;
}

.menu-actions {
    margin: 10px 0 16px;
}

.menu-button {
    display: inline-block;
    padding: 10px 16px;
    border: 1px solid #00bcd4;
    border-radius: 999px;
    color: #fff;
    text-decoration: none;
    background: rgba(0, 188, 212, 0.18);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.menu-button:hover,
.menu-button:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 0 16px rgba(0, 188, 212, 0.45);
    background: rgba(0, 188, 212, 0.3);
}

.menu-button:focus-visible {
    outline: 2px solid #FFD700;
    outline-offset: 2px;
}

.header h1 {
    font-size: 3em;
    color: #FFD700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    margin-bottom: 15px;
    letter-spacing: 5px;
}

.game-info {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.label {
    font-size: 0.9em;
    color: #00bcd4;
    margin-bottom: 5px;
}

.value {
    font-size: 1.5em;
    color: #FFD700;
    font-weight: bold;
}

.power-ups-display {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.power-status {
    display: flex;
    gap: 5px;
    align-items: center;
}

.power-label {
    font-size: 0.85em;
    color: #888;
}

.power-value {
    font-size: 0.9em;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
}

.power-status.active .power-value {
    color: #00ff00;
    background: rgba(0, 255, 0, 0.2);
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.8);
    animation: pulse 1s infinite;
}

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

#gameCanvas {
    display: block;
    margin: 0 auto;
    background: #000;
    border: 3px solid #00bcd4;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0, 188, 212, 0.5);
}

.controls {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    text-align: center;
}

.controls h3 {
    color: #00bcd4;
    margin-bottom: 10px;
}

.controls p {
    margin: 5px 0;
    font-size: 0.9em;
}

.controls strong {
    color: #FFD700;
}

.game-message {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s;
}

.game-message.hidden {
    display: none;
}

.message-content {
    text-align: center;
    padding: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    border: 2px solid #00bcd4;
    box-shadow: 0 0 50px rgba(0, 188, 212, 0.5);
}

.message-content h2 {
    font-size: 3em;
    color: #FFD700;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.7);
}

.message-content p {
    font-size: 1.2em;
    color: #fff;
}

.confirm-content {
    max-width: 560px;
}

.confirm-content h2 {
    font-size: 2.2em;
}

.confirm-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 18px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.confirm-btn {
    border: 1px solid #00bcd4;
    color: #fff;
    background: rgba(0, 188, 212, 0.2);
    border-radius: 10px;
    padding: 10px 14px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95em;
    transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.confirm-btn:hover,
.confirm-btn:focus-visible {
    transform: translateY(-1px);
    background: rgba(0, 188, 212, 0.32);
    box-shadow: 0 0 14px rgba(0, 188, 212, 0.35);
}

.confirm-btn:focus-visible {
    outline: 2px solid #FFD700;
    outline-offset: 2px;
}

.confirm-btn.selected {
    transform: translateY(-1px);
    box-shadow: 0 0 18px rgba(255, 215, 0, 0.55);
    outline: 2px solid #FFD700;
    outline-offset: 2px;
}

.confirm-btn-danger {
    border-color: #ff5252;
    background: rgba(255, 82, 82, 0.2);
}

.confirm-btn-danger:hover,
.confirm-btn-danger:focus-visible {
    background: rgba(255, 82, 82, 0.32);
    box-shadow: 0 0 14px rgba(255, 82, 82, 0.4);
}

.confirm-btn-danger.selected {
    background: rgba(255, 82, 82, 0.42);
    box-shadow: 0 0 18px rgba(255, 82, 82, 0.5);
}

.confirm-hint {
    margin-top: 8px;
    font-size: 0.9em;
    color: #9be8ff;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive design */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2em;
    }
    
    .game-info {
        font-size: 0.9em;
    }
    
    .value {
        font-size: 1.2em;
    }
}

/* Rules page */
.rules-wrapper {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
}

.rules-panel {
    background: rgba(0, 0, 0, 0.82);
    border-radius: 20px;
    padding: 26px;
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.25);
}

.rules-panel h1 {
    color: #FFD700;
    font-size: 2.3em;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.rules-subtitle {
    color: #9be8ff;
    margin-bottom: 20px;
}

.rules-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 14px;
}

.rules-card {
    border: 1px solid rgba(0, 188, 212, 0.45);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    padding: 14px;
}

.rules-card h2 {
    color: #00bcd4;
    font-size: 1.1em;
    margin-bottom: 10px;
}

.rules-card ul {
    padding-left: 18px;
}

.rules-card li {
    margin: 6px 0;
    line-height: 1.35;
}

.rules-footer {
    margin-top: 18px;
    display: flex;
    justify-content: center;
}

@media (max-width: 768px) {
    .rules-panel {
        padding: 18px;
    }

    .rules-panel h1 {
        font-size: 1.8em;
    }

    .rules-grid {
        grid-template-columns: 1fr;
    }
}
