body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: url("/static/fon.jpg") no-repeat center center fixed;
    background-size: cover;
    color: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
}

.logo {
    height: 50px;
}

.instruction {
    text-decoration: none;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 10px 20px;
    border-radius: 10px;
    color: white;
    font-size: 0.95rem;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.instruction:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.title {
    text-align: center;
    font-size: 3rem;
    font-weight: bold;
    margin-top: -20px;
}

.subtitle {
    text-align: center;
    font-size: 1.2rem;
    margin-top: 10px;
    color: #cccccc;
}

.menu {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin: 40px 20px;
}

.menu a {
    text-decoration: none;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 15px 25px;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.menu a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.footer {
    margin-top: auto;
    background-color: rgba(26, 58, 108, 0.95);
    color: white;
    text-align: center;
    padding: 15px 10px;
    font-size: 0.9rem;
}
/* === Мобильная адаптация (до 640px) === */
@media (max-width: 640px) {
  /* Кнопки — крупные и в столбик */
  .btn, button, a.btn {
    display: block;
    width: 100%;
    padding: 14px 18px;
    font-size: 16px;
    border-radius: 12px;
    min-height: 48px;
    text-align: center;
  }

  /* Обертки для кнопок — вертикально */
  .buttons, .actions, .btn-row, .menu, .nav-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  /* Общие отступы на мобильных */
  body, .container {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  /* Логотип — чуть меньше */
  .logo img {
    max-height: 42px;
  }
}
/* 📱 Адаптация под мобильные устройства */
@media (max-width: 640px) {
    body {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
    }

    header, .header, h1, h2, h3 {
        text-align: center;
    }

    .btn {
        display: block;
        width: 100%;
        max-width: 300px;
        margin: 10px auto;
        font-size: 1.2em;
        padding: 12px;
    }

    .buttons, .button-row {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    footer {
        margin-top: auto;
        text-align: center;
        padding: 10px 0;
    }
}
/* Адаптация под мобильные устройства */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .header img.logo {
        max-width: 120px;
        margin-bottom: 10px;
    }
    .instruction {
        display: block;
        width: 90%;
        margin: 5px 0;
        font-size: 18px;
        text-align: center;
    }
    .buttons {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    .buttons a {
        display: block;
        width: 90%;
        margin: 5px 0;
        text-align: center;
        font-size: 18px;
        padding: 12px 0;
    }
    body {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
    }
    footer {
        margin-top: auto;
        text-align: center;
        padding: 10px;
    }
}
