/* Сброс стандартных отступов и настройка box-sizing */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Основные стили для всего документа */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Стили для зеленой шапки */
.header {
    background: linear-gradient(90deg, #2e7d32 0%, #4caf50 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 600;
}

.logo i {
    margin-right: 10px;
    font-size: 1.8rem;
}

/* Основной контент */
.main-content {
    flex: 1;
    padding: 2rem 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.main-title {
    text-align: center;
    color: #2e7d32;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.subtitle {
    text-align: center;
    color: #555;
    font-size: 1.1rem;
    margin-bottom: 3rem;
    font-weight: 500;
}

/* Контейнер для плиток - 3 в ряд */
.tiles-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Стили для плиток */
.tile {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 3px solid transparent;
    position: relative;
    overflow: hidden;
    min-height: 380px;
}

.tile:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.tile:active {
    transform: translateY(-5px);
}

/* Картинка в плитке */
.tile-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 120px;
    background-size: cover;
    background-position: center;
    opacity: 0.1;
    z-index: 0;
    transition: opacity 0.3s ease;
}

.tile:hover .tile-image {
    opacity: 0.15;
}

.tile-icon, .tile-title, .tile-description, .tile-footer {
    position: relative;
    z-index: 1;
}

/* Иконка внутри плитки */
.tile-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Заголовок плитки */
.tile-title {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
    font-weight: 700;
}

/* Описание плитки */
.tile-description {
    text-align: center;
    color: #555;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    font-size: 0.95rem;
}

/* Футер плитки с кнопкой */
.tile-footer {
    text-align: center;
    margin-top: auto;
}

.tile-button {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    color: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.tile:hover .tile-button {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* Цвета для каждой плитки */
#order-tile {
    border-color: #FF6B6B;
    background: linear-gradient(145deg, #ffffff 0%, #fff5f5 100%);
}

#order-tile .tile-icon {
    background-color: #FF6B6B;
    color: white;
}

#order-tile .tile-button {
    background: linear-gradient(90deg, #FF6B6B 0%, #FF8E8E 100%);
}

#presentation-tile {
    border-color: #4ECDC4;
    background: linear-gradient(145deg, #ffffff 0%, #f0fffe 100%);
}

#presentation-tile .tile-icon {
    background-color: #4ECDC4;
    color: white;
}

#presentation-tile .tile-button {
    background: linear-gradient(90deg, #4ECDC4 0%, #6EE7E0 100%);
}

#extra-sentence-tile {
    border-color: #FFD166;
    background: linear-gradient(145deg, #ffffff 0%, #fffbf0 100%);
}

#extra-sentence-tile .tile-icon {
    background-color: #FFD166;
    color: white;
}

#extra-sentence-tile .tile-button {
    background: linear-gradient(90deg, #FFD166 0%, #FFE08A 100%);
}

#split-texts-tile {
    border-color: #06D6A0;
    background: linear-gradient(145deg, #ffffff 0%, #f0fff9 100%);
}

#split-texts-tile .tile-icon {
    background-color: #06D6A0;
    color: white;
}

#split-texts-tile .tile-button {
    background: linear-gradient(90deg, #06D6A0 0%, #2AF7C6 100%);
}

#missing-words-tile {
    border-color: #118AB2;
    background: linear-gradient(145deg, #ffffff 0%, #f0f9ff 100%);
}

#missing-words-tile .tile-icon {
    background-color: #118AB2;
    color: white;
}

#missing-words-tile .tile-button {
    background: linear-gradient(90deg, #118AB2 0%, #2BA9E0 100%);
}

#pictures-description-tile {
    border-color: #9D4EDD;
    background: linear-gradient(145deg, #ffffff 0%, #f9f0ff 100%);
}

#pictures-description-tile .tile-icon {
    background-color: #9D4EDD;
    color: white;
}

#pictures-description-tile .tile-button {
    background: linear-gradient(90deg, #9D4EDD 0%, #B873FF 100%);
}

/* Адаптивность для планшетов */
@media (max-width: 992px) {
    .tiles-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .tiles-container {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .tile {
        min-height: 350px;
    }
    
    .main-title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 0 15px;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .logo i {
        font-size: 1.5rem;
    }
    
    .main-title {
        font-size: 1.8rem;
    }
    
    .tile {
        padding: 1.5rem;
        min-height: 320px;
    }
    
    .tile-icon {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
    }
    
    .tile-title {
        font-size: 1.3rem;
    }
    
    .tile-description {
        font-size: 0.9rem;
    }
}