:root {
    --bg-color: #000;
    --text-color: #fff;
    --primary-color: #ff0;
    --secondary-color: #f12;
    --accent-color: #00f;
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    background-image: url('/background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--text-color);
    font-family: var(--font-family);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    height: 100vh;
}

.logo {
    position: absolute;
    top: 20px;
    left: 20px;
    height: 40px;
    z-index: 10;
}

#app {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    /* Shift to top */
}

#game-container {
    position: relative;
    display: none;
    margin-top: 40px;
    /* Space from top */
    width: 448px;
    /* Map width */
    height: 576px;
    /* Map height */
    /* Padding and borders from jsPacman might add to this, but starting here */
}

.js-pacman-playground {
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
}

#timer-display {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    z-index: 5;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 8px;
    font-family: monospace;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 20000;
    /* Higher than internal dialogs */
    backdrop-filter: blur(5px);
}

.hidden {
    display: none !important;
}

.button {
    background: var(--primary-color);
    color: #000;
    border: none;
    padding: 12px 24px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    transition: transform 0.2s, background 0.2s;
    text-transform: uppercase;
}

.button:hover {
    transform: scale(1.05);
    background: #e6e600;
}

.input-field {
    background: #222;
    border: 1px solid #444;
    color: #fff;
    padding: 10px;
    margin: 10px 0;
    width: 300px;
    border-radius: 4px;
}

h1 {
    font-size: 3rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(255, 255, 0, 0.5);
}


.rules-title {
    font-family: "Press Start 2P", system-ui;
    font-weight: bold;
    font-style: normal;
}