:root {
    --pac-yellow: #ffeb3b;
    --pac-bg: #050505;
    --wall-color: #2b3a9e;
    --ghost-red: #ff0000;
    --ghost-pink: #ffb8ff;
    --ghost-cyan: #00ffff;
    --ghost-orange: #ffb852;
    --dot-color: #ffb8ae;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--pac-bg);
    font-family: 'Outfit', sans-serif;
    color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.game-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    gap: 1.5rem;
}

.header-controls {
    width: 100%;
    max-width: 600px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.back-btn {
    color: #a1a1aa;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.back-btn:hover {
    color: var(--pac-yellow);
}

.game-wrapper {
    position: relative;
    padding: 10px;
    background: #000;
    border: 4px solid var(--wall-color);
    border-radius: 1rem;
    box-shadow: 0 0 40px rgba(43, 58, 158, 0.3);
}

#gameCanvas {
    display: block;
    border-radius: 0.5rem;
}

.stats-bar {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 600px;
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem 2rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-item {
    text-align: center;
}

.stat-label {
    font-size: 0.7rem;
    color: #71717a;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.3rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--pac-yellow);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    border-radius: 0.5rem;
    transition: opacity 0.4s;
}

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

.overlay h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--pac-yellow);
    text-shadow: 0 0 20px rgba(255, 235, 59, 0.3);
}

.primary-btn {
    background: var(--pac-yellow);
    color: #000;
    border: none;
    padding: 0.8rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 800;
    border-radius: 0.8rem;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
}

.primary-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(255, 235, 59, 0.4);
}

.lives-container {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.life-icon {
    width: 15px;
    height: 15px;
    background: var(--pac-yellow);
    clip-path: polygon(100% 0%, 100% 100%, 0% 100%, 0% 0%, 50% 50%);
    transform: rotate(135deg);
}
