/* ===== КОНТЕЙНЕР ДЛЯ LEGAL-СТРАНИЦ ===== */
.legal-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

/* ===== HEADER ===== */
.legal-header {
    text-align: center;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.legal-header h1 {
    color: var(--primary);
    font-size: 2.2rem;
}

.last-updated {
    color: #888;
    font-style: italic;
    font-size: 0.95rem;
}

/* ===== ЗАГОЛОВКИ ===== */
.legal-container h2 {
    color: var(--secondary);
    border-left: 4px solid var(--primary);
    padding-left: 1rem;
    margin-top: 2.5rem;
}

.legal-container h3 {
    color: var(--text);
    margin-top: 1.8rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px dashed #eee;
}

/* ===== NOTICE ===== */
.notice {
    background: var(--light);
    padding: 1.2rem 1.5rem 1.2rem 3rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
    margin: 1.5rem 0;
    position: relative;
}

.notice::before {
    content: "!";
    position: absolute;
    left: 0;
    top: 0;
    background: var(--primary);
    color: white;
    width: 30px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border-radius: 8px 0 0 8px;
}

.notice.warning { border-left-color: var(--warning); }
.notice.warning::before { background: var(--warning); content: "⚠"; }
.notice.success { border-left-color: var(--success); }
.notice.success::before { background: var(--success); content: "✓"; }

/* ===== СПИСКИ ===== */
.legal-container ul,
.legal-container ol { padding-left: 1.5rem; }

.legal-container li { margin-bottom: 0.5rem; }
.legal-container li::marker { color: var(--primary); }

/* ===== КОНТАКТЫ ===== */
.contact-info {
    background: var(--light);
    padding: 1.5rem;
    border-radius: 10px;
    margin-top: 2rem;
}

/* ===== CODE ===== */
code {
    background: rgba(88, 101, 242, 0.1);
    color: var(--primary);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
}

/* ===== BADGE ===== */
.badge {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 0.2rem 0.8rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}
.badge.warning { background: var(--warning); }
.badge.success { background: var(--success); }

/* ===== СПИСОК КОМАНД ===== */
.commands-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.5rem;
    background: var(--light);
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.commands-list span {
    background: white;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    text-align: center;
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 600;
}

/* ===== FOOTER ===== */
.legal-footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
    text-align: center;
    color: #888;
}

/* ===== ВЛОЖЕННЫЕ СПИСКИ ===== */
.legal-container h2 + ul ul,
.legal-container h3 + ul ul,
.legal-container p + ul ul {
    margin-top: 0.3rem;
    padding-left: 1.2rem;
    list-style-type: circle;
}

/* ===== NOTICE внутри списка ===== */
.notice ul {
    margin-top: 0.5rem;
    margin-bottom: 0;
}

.notice li:last-child { margin-bottom: 0; }
.notice strong {
    display: inline-block;
    margin-bottom: 0.3rem;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 768px) {
    .legal-container {
        padding: 1rem;
    }

    .legal-header h1 {
        font-size: 1.7rem;
    }

    .legal-container h2 {
        font-size: 1.3rem;
    }

    .legal-container h3 {
        font-size: 1.1rem;
    }

    .commands-list {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
}