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

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

body {
    background-color: #0d1117;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    font-family: 'Roboto', sans-serif;
    color: #fff;
    overflow: hidden;
}

#game-container {
    position: relative;
    width: 1280px;
    height: 720px;
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0, 255, 200, 0.3);
    overflow: hidden;
}

canvas {
    display: block;
}

/* UI Layer overlay */
#ui-layer {
    position: absolute;
    top: 20px;
    left: 20px;
    width: calc(100% - 40px);
    z-index: 10;
    pointer-events: none;
}

#ui-layer button {
    pointer-events: auto;
}

.energy-bar-container {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 16px;
    text-shadow: 1px 1px 2px #000;
}

.energy-bar-bg {
    width: 200px;
    height: 20px;
    background-color: rgba(0, 0, 0, 0.6);
    border: 2px solid #00ffcc;
    border-radius: 10px;
    overflow: hidden;
}

#energy-bar-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #00ffcc, #00b3ff);
    transition: width 0.3s ease-out, background 0.3s ease-out;
}

/* Modals with Glassmorphism */
.modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 17, 23, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    width: 80%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal-title {
    font-family: 'Orbitron', sans-serif;
    color: #00ffcc;
    margin-bottom: 15px;
    font-size: 24px;
}

.quiz-question {
    font-size: 18px;
    margin-bottom: 25px;
    line-height: 1.5;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn {
    background: rgba(0, 255, 204, 0.2);
    border: 1px solid #00ffcc;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Roboto', sans-serif;
}

.btn:hover {
    background: #00ffcc;
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 255, 204, 0.4);
}

#restart-btn {
    margin-top: 20px;
    background: #00b3ff;
    border-color: #00b3ff;
    color: #000;
    font-weight: bold;
}

#restart-btn:hover {
    background: #fff;
    box-shadow: 0 4px 15px rgba(0, 179, 255, 0.5);
}