﻿* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100vh;
    padding: 20px;
}

.header {
    width: 100%;
    max-width: 1200px;
    margin-bottom: 20px;
    text-align: center;
}

.header h1 {
    font-size: 24px;
    color: #333;
}

.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, 200px); /* Фиксированная ширина плиток */
    gap: 10px;
    width: 100%;
    max-width: 1200px;
    justify-content: center; /* Центрирование плиток по горизонтали */
}

.tile {
    background-color: #007bff;
    color: white;
    padding: 20px;
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 4px #0056b3;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 150px; /* Увеличиваем высоту плитки */
    word-wrap: break-word; /* Перенос слов, если они не помещаются в одну строку */
    width: 200px; /* Фиксированная ширина плитки */
}

.tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px #0056b3;
}

.tile:active {
    transform: translateY(4px);
    box-shadow: 0 2px #0056b3;
}

/* Медиа-запросы для адаптивности */
@media (min-width: 1200px) {
    .container {
        grid-template-columns: repeat(5, 200px); /* 5 плиток в ряд на больших экранах */
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .container {
        grid-template-columns: repeat(4, 200px); /* 4 плитки в ряд на средних экранах */
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .container {
        grid-template-columns: repeat(3, 200px); /* 3 плитки в ряд на малых экранах */
    }
}

@media (min-width: 576px) and (max-width: 767px) {
    .container {
        grid-template-columns: repeat(2, 200px); /* 2 плитки в ряд на очень малых экранах */
    }
}

@media (max-width: 575px) {
    .container {
        grid-template-columns: repeat(1, 200px); /* 1 плитка в ряд на самых маленьких экранах */
    }
}