/* Подключение шрифта Mulish */
@font-face {
    font-family: 'Mulish';
    src: url('Mulish-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

body {
    margin: 0;
    background-image: url('soccerback.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Mulish', sans-serif;
}

.page-container {
    background-color: rgba(0, 0, 0, 0.7); /* Полупрозрачный фон для читаемости */
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

header {
    margin-bottom: 20px;
}

header h1 {
    font-size: 2rem;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin: 0 0 10px;
}

.instructions {
    font-size: 1rem;
    color: #fef08a; /* Жёлтый текст для контраста */
    margin: 0 0 15px;
}

.back-button {
    display: inline-block;
    padding: 10px 20px;
    font-size: 1rem;
    background-color: #ef4444; /* Красная кнопка */
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
    margin-bottom: 15px;
}

.back-button:hover {
    background-color: #dc2626; /* Темнее при наведении */
}

.game-container {
    position: relative;
}

#gameCanvas {
    border: 2px solid #333;
    background-color: #1b5e20; /* Тёмно-зелёный фон для поля */
}

.game-over {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 10px;
    color: white;
}

.game-over h2 {
    margin: 0 0 20px;
    font-size: 24px;
}

#restartButton {
    padding: 10px 20px;
    font-size: 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#restartButton:hover {
    background-color: #45a049;
}