/* Сброс стандартных отступов и настройка 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%, #e3e8f0 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

/* Стили для шапки */
.header {
    background: linear-gradient(90deg, #FFD166 0%, #FFE08A 100%);
    color: #333;
    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;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 600;
    gap: 15px;
}

.back-link {
    color: #333;
    text-decoration: none;
    font-size: 1.3rem;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
}

.back-link:hover {
    transform: translateX(-5px);
    color: #555;
}

/* Основной контент */
.main-content {
    padding: 2rem 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.main-title {
    text-align: center;
    color: #333;
    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;
}

/* Контейнер для плиток заданий */
.tiles-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Стили для плиток заданий */
.task-tile {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    border: 3px solid transparent;
    position: relative;
    overflow: hidden;
    min-height: 450px;
    transition: all 0.3s ease;
}

.task-tile:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Иконка задания */
.task-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.5rem;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    color: white;
}

/* Заголовок задания */
.task-title {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
    font-weight: 700;
}

/* Описание задания */
.task-description {
    text-align: center;
    color: #555;
    margin-bottom: 2rem;
    flex-grow: 1;
    font-size: 1rem;
    line-height: 1.8;
}

.task-description p {
    margin-bottom: 0;
}

/* Футер с кнопкой */
.task-footer {
    text-align: center;
    margin-top: auto;
}

.task-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    color: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    font-family: inherit;
    min-width: 200px;
}

.task-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.task-button:active {
    transform: scale(0.98);
}

/* Цвета для каждой плитки задания */
#task1-tile {
    border-color: #FF6B6B;
    background: linear-gradient(145deg, #ffffff 0%, #fff5f5 100%);
}

#task1-tile .task-icon {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E8E 100%);
}

#task1-tile .task-button {
    background: linear-gradient(90deg, #FF6B6B 0%, #FF8E8E 100%);
}

#task2-tile {
    border-color: #4ECDC4;
    background: linear-gradient(145deg, #ffffff 0%, #f0fffe 100%);
}

#task2-tile .task-icon {
    background: linear-gradient(135deg, #4ECDC4 0%, #6EE7E0 100%);
}

#task2-tile .task-button {
    background: linear-gradient(90deg, #4ECDC4 0%, #6EE7E0 100%);
}

#task3-tile {
    border-color: #9D4EDD;
    background: linear-gradient(145deg, #ffffff 0%, #f9f0ff 100%);
}

#task3-tile .task-icon {
    background: linear-gradient(135deg, #9D4EDD 0%, #B873FF 100%);
}

#task3-tile .task-button {
    background: linear-gradient(90deg, #9D4EDD 0%, #B873FF 100%);
}

/* Инструкция */
.instruction-box {
    background: linear-gradient(135deg, #FFE08A 0%, #FFD166 100%);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(255, 209, 102, 0.3);
    max-width: 800px;
    margin: 0 auto;
}

.instruction-box h3 {
    color: #333;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    font-size: 1.5rem;
}

.instruction-box h3 i {
    margin-right: 10px;
    font-size: 1.8rem;
}

.instruction-box ol {
    padding-left: 1.5rem;
    color: #333;
}

.instruction-box li {
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
    line-height: 1.6;
}

/* Адаптивность для планшетов */
@media (max-width: 992px) {
    .tiles-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    #task3-tile {
        grid-column: span 2;
        max-width: 500px;
        margin: 0 auto;
    }
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .tiles-container {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }
    
    #task3-tile {
        grid-column: span 1;
    }
    
    .task-tile {
        min-height: 400px;
        padding: 2rem 1.5rem;
    }
    
    .main-title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .task-icon {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }
    
    .task-title {
        font-size: 1.6rem;
    }
    
    .instruction-box {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 0 15px;
    }
    
    .logo {
        font-size: 1.2rem;
        gap: 10px;
    }
    
    .back-link {
        font-size: 1.1rem;
    }
    
    .main-title {
        font-size: 1.8rem;
    }
    
    .task-tile {
        min-height: 380px;
        padding: 1.5rem;
    }
    
    .task-icon {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
    }
    
    .task-title {
        font-size: 1.4rem;
    }
    
    .task-description {
        font-size: 0.95rem;
    }
    
    .task-button {
        padding: 0.9rem 2rem;
        font-size: 1rem;
        min-width: 180px;
    }
}