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

:root {
    --rink-bg: radial-gradient(circle, #0d1a3a 0%, #0a0f1f 70%);
    --rink-border: #00d1ff;
    --center-line: #ff1b8d;
    --paddle-player-fill: #00d1ff;
    --paddle-opponent-fill: #ff1b8d;
    --puck-fill: #ffffff;
    --text-light: #ffffff;
    --text-dark: #222222;
    --menu-bg: rgba(10, 15, 31, 0.9);
    --overlay-bg: rgba(10, 15, 31, 0.95);
    --puck-glow: rgba(255, 255, 255, 0.8);
}


body, html {
    margin: 0;
    padding: 0;
    overflow: hidden;
    height: 100%;
    background-color: #0a0f1f;
    font-family: 'Roboto', sans-serif;
    color: var(--text-light);
}

#background-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#game-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, var(--rink-bg), #0e1528);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 10;
}

.menu-content h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 5rem;
    color: var(--rink-border);
    text-shadow: 0 0 15px var(--rink-border), 0 0 25px var(--rink-border);
    margin-bottom: 2rem;
}

.menu-content .btn-primary {
    margin: 0.5rem;
    min-width: 250px;
    font-size: 1.2rem;
    padding: 0.8rem 1.5rem;
}

#game-container {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#game-canvas {
    background: transparent;
    border-radius: 12px;
    box-shadow: 0 0 20px var(--rink-border), 0 0 40px var(--rink-border), inset 0 0 15px rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 2;
}

#exit-button {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 100;
}

#scoreboard {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    background-color: rgba(0,0,0,0.4);
    padding: 1rem 2.5rem;
    border-radius: 20px;
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    border: 2px solid var(--rink-border);
    box-shadow: 0 0 15px rgba(26, 125, 255, 0.3);
}

#player1-score {
    color: var(--paddle-player-fill);
    text-shadow: 0 0 10px var(--paddle-player-fill);
}

#player2-score {
    color: var(--paddle-opponent-fill);
    text-shadow: 0 0 10px var(--paddle-opponent-fill);
}

#timer {
    color: var(--text-light);
    margin: 0 2rem;
}

.settings-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 2rem 0;
    width: 100%;
    max-width: 300px;
}

.slider-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.slider-container label {
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.slider-container input[type="range"] {
    width: 100%;
}

#game-over-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--overlay-bg);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 2rem;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

#game-over-overlay.visible {
    display: flex;
    opacity: 1;
}

#game-over-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 6rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 0 20px var(--text-light);
}

#final-score-display {
    font-size: 2rem;
    margin-bottom: 2rem;
    font-weight: 700;
}

#play-again-btn {
    padding: 1rem 2.5rem;
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--rink-border), #4da1ff);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    margin-top: 2rem;
    transition: transform 0.2s, box-shadow 0.2s;
    font-weight: 600;
    font-family: 'Roboto', sans-serif;
}

#play-again-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px var(--rink-border);
}

#how-to-play {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(26, 125, 255, 0.2);
    text-align: left;
    max-width: 400px;
}

#how-to-play h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: var(--rink-border);
    text-align: center;
    font-family: 'Orbitron', sans-serif;
}

#how-to-play p {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

#how-to-play strong {
    color: var(--rink-border);
    font-weight: 700;
}
