/* === ОБЩИЕ СТИЛИ === */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 20px 20px 10px;
    background: #0d1824;
    font-family: 'Segoe UI', -apple-system, Roboto, system-ui, sans-serif;
    color: #e2e8f0;
}

/* === ШАПКА === */
.page-header {
    text-align: center;
    max-width: 950px;
    margin-bottom: 30px;
    padding: 20px 20px 0;
}
.page-header h1 {
    font-size: 2.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #38bdf8, #2dd4bf);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}
.page-header .subtitle {
    font-size: 1.2rem;
    color: #94a3b8;
    font-weight: 300;
}

/* === НАВИГАЦИЯ === */
.nav-tasks {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 1050px;
    width: 100%;
    margin-bottom: 40px;
}
.nav-link {
    display: inline-block;
    padding: 11px 20px;
    background: #1a293b;
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 40px;
    border: 1px solid #2a3f54;
    transition: all 0.2s ease;
    flex: 1 0 auto;
    text-align: center;
}
.nav-link:hover {
    background: #263b52;
    border-color: #38bdf8;
    color: #f0f9ff;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(56, 189, 248, 0.12);
}

/* === БЛОКИ ЗАДАЧ === */
.task-block {
    display: none;
    background: #111f2e;
    padding: 30px 35px 35px;
    border-radius: 28px;
    max-width: 960px;
    width: 100%;
    border: 1px solid #1e3142;
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.6);
    margin-bottom: 30px;
}
.task-block:target { display: block; animation: fadeSlide .4s cubic-bezier(0.2, 0.9, 0.3, 1); }
@keyframes fadeSlide {
    0% { opacity: 0; transform: translateY(18px); }
    100% { opacity: 1; transform: translateY(0); }
}
.task-block h2 {
    color: #38bdf8;
    font-size: 1.9rem;
    font-weight: 600;
    margin-bottom: 4px;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.task-desc {
    color: #94a3b8;
    font-size: 1.05rem;
    border-bottom: 1px solid #1e3142;
    padding-bottom: 18px;
    margin-bottom: 24px;
}

/* === ПОДБЛОКИ (details/summary) === */
.sub-block {
    background: #0d1926;
    border-radius: 16px;
    margin-bottom: 14px;
    border-left: 4px solid #2dd4bf;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: border-color 0.2s;
}
.sub-block[open] { border-left-color: #38bdf8; }

.sub-block summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
}
.sub-block summary::-webkit-details-marker { display: none; }
.sub-block summary::-moz-list-bullet { list-style-type: none; }

.sub-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: rgba(56, 189, 248, 0.03);
    transition: background 0.2s;
    border-radius: 16px 16px 0 0;
}
.sub-header:hover { background: rgba(56, 189, 248, 0.07); }
.sub-header .icon {
    font-size: 1.5rem;
    line-height: 1;
    min-width: 34px;
}
.sub-header span:last-child {
    font-size: 1.15rem;
    font-weight: 500;
    color: #e2e8f0;
    flex: 1;
}

.sub-header::after {
    content: '▶';
    color: #5f7d9c;
    font-size: 0.7rem;
    transition: transform 0.3s ease, color 0.2s;
    margin-left: 6px;
    opacity: 0.7;
}
.sub-block[open] .sub-header::after {
    transform: rotate(90deg);
    color: #38bdf8;
}

.sub-content {
    padding: 0 22px 18px;
}
.sub-block[open] .sub-content { animation: contentFade 0.25s ease; }
@keyframes contentFade {
    0% { opacity: 0; transform: translateY(-6px); }
    100% { opacity: 1; transform: translateY(0); }
}
.sub-content p {
    font-size: 0.98rem;
    line-height: 1.6;
    margin-bottom: 12px;
    color: #cbd5e1;
}
.sub-content strong {
    color: #2dd4bf;
    font-weight: 600;
}
.sub-content ul {
    list-style: none;
    padding-left: 4px;
}
.sub-content ul li {
    position: relative;
    padding: 6px 0 6px 26px;
    border-bottom: 1px solid rgba(45, 212, 191, 0.06);
    line-height: 1.5;
    color: #e2e8f0;
    font-size: 0.95rem;
}
.sub-content ul li:last-child { border-bottom: none; }
.sub-content ul li::before {
    content: '▹';
    position: absolute;
    left: 4px;
    color: #38bdf8;
    font-size: 1.1rem;
}

/* === ФУТЕР === */
.page-footer {
    margin-top: 20px;
    padding: 18px 0 8px;
    color: #475569;
    font-size: 0.85rem;
    text-align: center;
    border-top: 1px solid #1e2a3a;
    width: 100%;
    max-width: 960px;
}

/* === АДАПТИВНОСТЬ === */
@media (max-width: 768px) {
    body { padding: 12px; }
    .page-header h1 { font-size: 2rem; }
    .page-header .subtitle { font-size: 1rem; }
    .nav-tasks { flex-direction: column; max-width: 400px; }
    .nav-link { width: 100%; flex: none; }
    .task-block { padding: 18px 16px 22px; }
    .task-block h2 { font-size: 1.4rem; flex-wrap: wrap; }
    .sub-header { padding: 12px 14px; gap: 10px; flex-wrap: wrap; }
    .sub-header span:last-child { font-size: 1rem; }
    .sub-content { padding: 0 14px 16px; }
    .sub-content ul li { font-size: 0.9rem; padding: 5px 0 5px 22px; }
}
@media (max-width: 480px) {
    .page-header h1 { font-size: 1.6rem; }
    .task-block h2 { font-size: 1.2rem; }
    .sub-header .icon { font-size: 1.2rem; min-width: 28px; }
    .sub-header span:last-child { font-size: 0.9rem; }
}
