/* Import de la police */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&display=swap');

.bowling-scorer {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 1rem;
    border: 2px solid var(--primary-red);
    border-radius: 10px;
    box-shadow: var(--neon-red);
    font-family: 'Orbitron', sans-serif;
}

.bowling-scorer h2 {
    text-align: center;
    color: var(--primary-red);
    text-shadow: var(--neon-red);
    margin-bottom: 1rem;
}

.frames-container {
    display: flex;
    gap: 5px;
    justify-content: center;
    flex-wrap: wrap;
}

.frame {
    flex: 1;
    min-width: 80px;
    background-color: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--primary-blue);
    border-radius: 5px;
    padding: 5px;
    text-align: center;
    box-shadow: var(--neon-blue);
    width: 100%;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.frame.current {
    border-color: var(--primary-red);
    box-shadow: var(--neon-red);
    background-color: rgba(255, 0, 0, 0.1);
    transform: scale(1.05);
}

.frame-number {
    font-weight: bold;
    color: var(--primary-blue);
    text-shadow: var(--neon-blue);
    font-size: 1.2em;
    margin-bottom: 5px;
}

.rolls {
    color: var(--primary-red);
    font-size: 1.1em;
    font-weight: bold;
    text-shadow: var(--neon-red);
    font-style: italic;
}

.score {
    color: var(--primary-blue);
    font-size: 1.4em;
    font-weight: bold;
    text-shadow: var(--neon-blue);
    margin-top: 5px;
}

/* Style pour les strikes */
.rolls:contains('X') {
    color: #ff0000;
    font-weight: bold;
    animation: glow 1s ease-in-out infinite alternate;
}

/* Style pour les spares */
.rolls:contains('/') {
    color: #00ff00;
    font-weight: bold;
}

@keyframes glow {
    from {
        text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #ff0000;
    }
    to {
        text-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px #ff0000;
    }
}

#gameMessage {
    text-align: center;
    margin-top: 1rem;
    color: var(--primary-red);
    font-size: 1.2em;
    text-shadow: var(--neon-red);
}

/* Responsive design */
@media (max-width: 768px) {
    .frame {
        min-width: 60px;
        font-size: 0.8em;
    }
    
    .frame-number {
        font-size: 1rem;
    }
    
    .score {
        font-size: 1.2rem;
    }
}

#pinButtons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin: 2rem 0;
}

.pin-button {
    background-color: var(--primary-blue);
    color: var(--light);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pin-button:hover {
    background-color: var(--primary-red);
    transform: scale(1.05);
}

.game-instructions {
    text-align: center;
    margin-top: 10px;
    color: #666;
}

.new-game-button {
    background-color: var(--primary-red);
    color: var(--light);
    border: none;
    padding: 1rem 2rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2rem;
    margin-top: 2rem;
    transition: all 0.3s ease;
}

.new-game-button:hover {
    background-color: var(--primary-blue);
    transform: scale(1.05);
}

.bowling-game-container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 10px;
    position: relative;
}

canvas {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    image-rendering: -moz-crisp-edges;
    image-rendering: -webkit-crisp-edges;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

.score-container {
    width: 140px;
    position: absolute;
    left: 0;
    top: 20px;
}
