/* Rabbit Throwing Game - Style Sheet */

/* Global Styles and Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #2a2a36; /* Dark background for contrast */
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background-image: linear-gradient(45deg, #2a2a36 25%, #323242 25%, #323242 50%, #2a2a36 50%, #2a2a36 75%, #323242 75%, #323242 100%);
    background-size: 40px 40px;
}

/* Game Container */
.game-container {
    max-width: 900px;
    width: 100%;
    background-color: #3a3a4a;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.game-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4, #8a5fff);
    border-radius: 20px 20px 0 0;
}

/* Canvas Styling */
#gameCanvas {
    width: 100%;
    max-width: 800px;
    height: auto;
    background-color: #f5f5f5;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 20px;
    display: block;
}

/* Game UI Elements */
.game-ui {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 10px;
    flex-wrap: wrap;
}

@media (max-width: 600px) {
    .game-ui {
        flex-direction: column;
        gap: 15px;
    }
}

/* Score Container */
.score-container {
    background-color: #4a4a5a;
    padding: 10px 20px;
    border-radius: 50px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border: 2px solid #5a5a6a;
}

.score-container h2 {
    font-size: 1.5rem;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

#score {
    color: #4ecdc4;
    font-weight: bold;
    font-size: 1.8rem;
}

/* Controls */
.controls {
    display: flex;
    gap: 15px;
}

button {
    padding: 12px 24px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    letter-spacing: 1px;
}

#startButton {
    background-color: #4ecdc4;
    color: #2a2a36;
}

#resetButton {
    background-color: #ff6b6b;
    color: #ffffff;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Instructions */
.instructions {
    background-color: #4a4a5a;
    padding: 20px;
    border-radius: 12px;
    width: 100%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-left: 4px solid #8a5fff;
}

.instructions h3 {
    color: #8a5fff;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.instructions p {
    margin-bottom: 10px;
    line-height: 1.5;
    color: #e0e0e0;
}

.instructions p:last-child {
    margin-bottom: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-container {
        padding: 15px;
    }
    
    button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .score-container h2 {
        font-size: 1.3rem;
    }
    
    #score {
        font-size: 1.5rem;
    }
    
    .instructions h3 {
        font-size: 1.2rem;
    }
    
    .instructions p {
        font-size: 0.9rem;
    }
}

/* Animation for game elements */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.score-container:has(#score:not(:empty)) {
    animation: pulse 2s infinite;
}