body,
html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #f0f4f8;
    font-family: 'Fredoka One', cursive;
    user-select: none;
}

#game-container {
    position: relative;
    width: 100%;
    height: 100%;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
}

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    pointer-events: auto;
    transition: opacity 0.3s;
    z-index: 10;
}

.hidden {
    display: none !important;
}

h1 {
    font-size: 5rem;
    color: #FF6B6B;
    text-shadow: 3px 3px 0px #2E2E2E;
    margin-bottom: 0.5rem;
    margin-top: 0;
}

p {
    font-size: 2rem;
    color: #4dc0b5;
    margin-bottom: 2rem;
}

button {
    padding: 1rem 4rem;
    font-size: 2.5rem;
    font-family: 'Fredoka One', cursive;
    background-color: #4ECDC4;
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 8px 0 #3b9b95;
    transition: transform 0.1s, box-shadow 0.1s;
}

button:active {
    transform: translateY(4px);
    box-shadow: 0 4px 0 #3b9b95;
}

#hud {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.hud-item {
    position: absolute;
    top: 20px;
    font-size: 2rem;
    color: #2E2E2E;
    background: rgba(255, 255, 255, 0.8);
    padding: 10px 20px;
    border-radius: 20px;
}

.hud-item.left {
    left: 20px;
}

.hud-item.right {
    right: 20px;
}

#timer-bar-container {
    position: absolute;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    border: 4px solid #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

#timer-bar {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #FF6B6B, #FF8E53);
    transition: width 0.1s linear;
}

/* Reward Styles */
.reward-buttons {
    display: flex;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.reward-btn {
    padding: 1rem 2rem;
    font-size: 1.5rem;
    background-color: #FFD93D;
    box-shadow: 0 6px 0 #d4b21e;
}

.reward-btn:active {
    box-shadow: 0 3px 0 #d4b21e;
    transform: translateY(3px);
}

#btn-tetris {
    background-color: #FF6B6B;
    box-shadow: 0 6px 0 #c74b4b;
}

#btn-pong {
    background-color: #4ECDC4;
    box-shadow: 0 6px 0 #3b9b95;
}

#btn-asteroids {
    background-color: #9B5DE5;
    box-shadow: 0 6px 0 #7e3ebc;
}

#reward-hud {
    z-index: 5;
}

/* Difficulty Buttons */
.difficulty-select {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.diff-btn {
    padding: 1rem 2rem;
    font-size: 1.5rem;
    text-transform: uppercase;
}

.diff-btn.easy {
    background-color: #2ECC71;
    box-shadow: 0 6px 0 #27ae60;
}

.diff-btn.medium {
    background-color: #F1C40F;
    box-shadow: 0 6px 0 #f39c12;
}

.diff-btn.hard {
    background-color: #E74C3C;
    box-shadow: 0 6px 0 #c0392b;
}

.diff-btn:active {
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.2);
    transform: translateY(3px);
}