/* Dolphin Race Game Styles */

.game-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.game-header h1 {
    color: var(--color-primary, #1e9bd7);
    margin-bottom: 0.5rem;
}

.game-header p {
    color: var(--color-text-muted, #666);
    margin-bottom: 0.5rem;
}

.back-link {
    color: var(--color-primary, #1e9bd7);
    text-decoration: none;
    font-size: 0.9rem;
}

.back-link:hover {
    text-decoration: underline;
}

.game-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    height: 700px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    background: linear-gradient(180deg, #87CEEB 0%, #1e3a5a 20%, #0a1a2a 100%);
}

#gameCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* HUD Styles */
#hud {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 20px;
    z-index: 10;
    pointer-events: none;
}

.hud-item {
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 16px;
    border-radius: 8px;
    color: #fff;
    font-family: 'Arial', sans-serif;
    font-size: 14px;
}

.hud-label {
    opacity: 0.8;
    margin-right: 4px;
}

#distance-display,
#time-display {
    font-weight: bold;
    color: #00ff88;
}

/* UI Layer */
#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 20;
}

#start-screen,
#game-over-screen {
    background: rgba(10, 26, 42, 0.95);
    padding: 2rem 3rem;
    border-radius: 16px;
    text-align: center;
    color: #fff;
    pointer-events: auto;
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    box-shadow: 0 0 40px rgba(30, 155, 215, 0.3);
    border: 1px solid rgba(30, 155, 215, 0.3);
}

#start-screen.active,
#game-over-screen.active {
    transform: scale(1);
    opacity: 1;
}

#start-screen.hidden,
#game-over-screen.hidden {
    display: none;
}

#start-screen h2,
#game-over-screen h2 {
    color: #1e9bd7;
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
}

#start-screen p,
#game-over-screen p {
    margin-bottom: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
}

.controls-info {
    background: rgba(30, 155, 215, 0.1);
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.controls-info p {
    margin: 0.3rem 0;
    font-size: 0.9rem;
}

.button {
    display: inline-block;
    padding: 12px 32px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 0.5rem;
}

.button--primary {
    background: linear-gradient(135deg, #1e9bd7, #00d4aa);
    color: #fff;
    box-shadow: 0 4px 20px rgba(30, 155, 215, 0.4);
}

.button--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(30, 155, 215, 0.6);
}

.button--primary:active {
    transform: translateY(0);
}

/* Game Over specific styles */
#game-over-title {
    font-size: 2rem;
}

#game-over-message {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
}

#final-time {
    color: #00ff88;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
    .game-container {
        height: 600px;
        border-radius: 8px;
    }
    
    #start-screen,
    #game-over-screen {
        padding: 1.5rem 2rem;
    }
    
    .hud-item {
        padding: 6px 12px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .game-container {
        height: 500px;
    }
    
    #hud {
        flex-direction: column;
        gap: 8px;
    }
    
    .button {
        padding: 10px 24px;
        font-size: 0.9rem;
    }
}
