* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    line-height: 1.6;
    background: 
        linear-gradient(#ffffffce, #ffffffce),
        url('shore.webp') center/cover fixed;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.site-header {
    padding: 25px 0;
    text-align: center;
    background: linear-gradient(90deg, #000000 0%, #000000 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.brand {
    font-size: 2.2rem;
    margin: 0;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero {
    margin: 40px 0;
}

.hero-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 30px;
    gap: 40px;
}

.task-article {
    width: 100%;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.task-article:hover {
    transform: translateY(-5px);
}

.task-header {
    margin-bottom: 25px;
    border-bottom: 3px solid #000000;
    padding-bottom: 15px;
}

.task-header h2 {
    margin: 0 0 10px;
    font-size: 1.8rem;
    color: #2c3e50;
}

.task-description {
    margin: 0;
    font-size: 1.1rem;
    color: #666;
    font-style: italic;
}

.task-content {
    margin-top: 20px;
}

.task-content h3 {
    margin: 25px 0 15px;
    color: #2c3e50;
    font-size: 1.3rem;
    border-left: 4px solid #000000;
    padding-left: 10px;
}

.task-content p {
    margin: 0 0 20px;
    font-size: 1.05rem;
    line-height: 1.7;
}

.task-image {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 25px 0;
}

.task-image img {
    max-width: 100%;
    width: auto;
    max-height: 500px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 3px solid #fff;
}

.task-image img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.semantic-tags {
    list-style: none;
    padding: 0;
    margin: 25px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.semantic-tags li {
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 8px;
    border-left: 4px solid #000000;
}

.task-subsection {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #000000;
}

.useful-links {
    list-style: none;
    padding: 0;
    margin: 25px 0;
}

.useful-links li {
    margin: 15px 0;
}

.useful-links a {
    display: block;
    padding: 15px;
    background: #000000;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.useful-links a:hover {
    background: #000000;
    transform: translateX(5px);
}

strong {
    color: #2c3e50;
    font-weight: 700;
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    border-left: 3px solid #000000;
}

.site-footer {
    text-align: center;
    padding: 25px;
    background: #000000;
    color: white;
    margin-top: 60px;
    font-size: 56px;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
}

.site-footer p {
    margin: 0;
    font-weight: 500;
}

.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    visibility: hidden;
    opacity: 0;
    background: rgba(0, 0, 0, 0.85);
    transition: all 0.3s ease;
    z-index: 1000;
}

.modal[aria-hidden="false"] {
    visibility: visible;
    opacity: 1;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 12px;
    max-width: 90%;
    width: auto;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-close {
    position: absolute;
    right: 15px;
    top: 15px;
    border: 0;
    background: #e74c3c;
    color: white;
    font-size: 20px;
    cursor: pointer;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.modal-close:hover {
    background: #c0392b;
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .brand {
        font-size: 1.8rem;
    }
    
    .task-article {
        padding: 20px;
    }
    
    .task-header h2 {
        font-size: 1.6rem;
    }
    
    .semantic-tags {
        grid-template-columns: 1fr;
    }
    
    .site-footer {
        font-size: 2rem;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .brand {
        font-size: 1.5rem;
    }
    
    .task-article {
        padding: 15px;
    }
    
    .task-header h2 {
        font-size: 1.4rem;
    }
    
    .task-content h3 {
        font-size: 1.2rem;
    }
    
    .site-footer {
        font-size: 1.5rem;
        padding: 15px;
    }
}