/* Pac-Man Game Styles */
.game-container {
    max-width: 1000px;
    margin: 100px auto 50px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.game-header {
    text-align: center;
    margin-bottom: 30px;
}

.game-header h1 {
    font-family: 'Orbitron', monospace;
    font-size: 3em;
    color: var(--primary-gradient);
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.game-header p {
    font-size: 1.2em;
    color: var(--text-gray);
}

.game-info {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.score-display, .level-display, .lives-display {
    text-align: center;
    padding: 10px;
}

.score-display .label, .level-display .label, .lives-display .label {
    display: block;
    color: var(--text-gray);
    font-size: 0.9em;
    margin-bottom: 5px;
}

.score-display span:last-child, 
.level-display span:last-child, 
.lives-display span:last-child {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--accent-color);
    font-family: 'Orbitron', monospace;
}

.game-canvas-container {
    position: relative;
    text-align: center;
    margin-bottom: 30px;
}

#pacmanCanvas {
    background: #000;
    border: 3px solid var(--accent-color);
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
    max-width: 100%;
    height: auto;
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: all 0.3s ease;
}

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

.overlay-content {
    text-align: center;
    color: var(--text-light);
}

.overlay-content h2 {
    font-family: 'Orbitron', monospace;
    font-size: 2.5em;
    color: #ffff00;
    margin-bottom: 20px;
    text-shadow: 0 0 20px #ffff00;
}

.overlay-content p {
    font-size: 1.1em;
    color: var(--text-gray);
    margin-bottom: 20px;
}

.game-btn {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 1em;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 5px;
    font-family: 'Orbitron', monospace;
    font-weight: 500;
}

.game-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 255, 0.4);
}

.game-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

.controls-section, .power-ups-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.controls-section h3, .power-ups-section h3 {
    color: var(--text-light);
    margin-bottom: 20px;
    font-family: 'Orbitron', monospace;
    display: flex;
    align-items: center;
    gap: 10px;
}

.controls-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.control-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.control-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.control-item i {
    color: var(--accent-color);
    font-size: 1.2em;
    width: 20px;
    text-align: center;
}

.control-item span {
    color: var(--text-light);
    font-weight: 500;
}

.powerup-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.powerup-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.powerup-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #ffff00;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #000;
    font-size: 0.8em;
}

.powerup-icon.big {
    width: 40px;
    height: 40px;
    background: #ff6b6b;
    animation: pulse 1.5s ease-in-out infinite;
}

.powerup-icon.fruit {
    background: transparent;
    font-size: 1.5em;
}

.powerup-item span {
    color: var(--text-light);
    font-weight: 500;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Fullscreen button positioning */
.fullscreen-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1em;
    z-index: 10;
}

.fullscreen-btn:hover {
    background: var(--accent-color);
    color: black;
    transform: scale(1.05);
}

/* Game elements animations */
.dot-collect {
    animation: collectDot 0.3s ease-out forwards;
}

@keyframes collectDot {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(2); opacity: 0; }
}

.ghost-vulnerable {
    animation: ghostFlash 0.2s ease-in-out infinite;
}

@keyframes ghostFlash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.pacman-chomp {
    animation: chomp 0.2s ease-in-out infinite;
}

@keyframes chomp {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(0.9); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-container {
        padding: 15px;
        margin-top: 80px;
    }
    
    .game-header h1 {
        font-size: 2.5em;
    }
    
    .game-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .game-controls {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .controls-grid {
        grid-template-columns: 1fr;
    }
    
    #pacmanCanvas {
        width: 100%;
        max-width: 400px;
        height: auto;
    }
}

@media (max-width: 480px) {
    .game-header h1 {
        font-size: 2em;
    }
    
    .controls-section, .power-ups-section {
        padding: 20px;
    }
}