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

body {
    background: #2a2a2a;
    font-family: 'Courier New', monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: white;
}

#game-container {
    background: #1a1a1a;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

#gba-screen {
    position: relative;
    width: 480px;
    height: 320px;
    background: #000;
    border: 3px solid #333;
    border-radius: 5px;
    overflow: hidden;
}

#game-canvas {
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

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

#dialogue-box {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.9);
    border: 3px solid white;
    padding: 10px;
    border-radius: 5px;
    color: white;
    font-size: 14px;
    line-height: 1.4;
}

#dialogue-box.hidden,
#battle-ui.hidden,
#move-selection.hidden {
    display: none;
}

#battle-ui {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.9);
    border-top: 3px solid white;
    padding: 10px;
}

.battle-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 10px;
}

.pokemon-info {
    text-align: center;
    font-size: 12px;
}

.hp-bar {
    width: 80px;
    height: 8px;
    background: #333;
    border: 2px solid white;
    margin: 5px 0;
    border-radius: 2px;
}

#player-hp, #enemy-hp {
    height: 100%;
    background: #4caf50;
    transition: width 0.3s ease;
}

.battle-menu {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.battle-menu button {
    background: #4a4a4a;
    color: white;
    border: 2px solid white;
    padding: 8px 16px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    cursor: pointer;
    border-radius: 3px;
}

.battle-menu button:hover {
    background: #6a6a6a;
}

#move-selection {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.95);
    border: 3px solid white;
    padding: 15px;
    border-radius: 5px;
    pointer-events: auto;
}

.move-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.move-buttons button {
    background: #4a4a4a;
    color: white;
    border: 2px solid white;
    padding: 10px 20px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    cursor: pointer;
    border-radius: 3px;
    text-align: left;
}

.move-buttons button:hover {
    background: #6a6a6a;
}

#gba-controls {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dpad {
    position: relative;
    width: 120px;
    height: 120px;
}

.dpad button {
    position: absolute;
    width: 40px;
    height: 40px;
    background: #4a4a4a;
    border: 2px solid white;
    color: white;
    font-size: 18px;
    cursor: pointer;
    border-radius: 3px;
}

.dpad button:hover {
    background: #6a6a6a;
}

#up-btn {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

#down-btn {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

#left-btn {
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

#right-btn {
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.action-buttons button {
    background: #4a4a4a;
    color: white;
    border: 2px solid white;
    padding: 15px 25px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    cursor: pointer;
    border-radius: 5px;
    min-width: 80px;
}

.action-buttons button:hover {
    background: #6a6a6a;
}

#a-btn {
    background: #ff6b6b;
}

#b-btn {
    background: #4ecdc4;
}