/* ===== RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* ===== BASE ===== */
html {
    background: #e8edf2;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #e8edf2;
    color: #000;
    -webkit-font-smoothing: antialiased;
    min-height: 100dvh;
    position: relative;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
}

/* ===== ЖИВЫЕ ПЯТНА ===== */
body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(90px);
    opacity: 0.55;
}

body::before {
    width: 380px;
    height: 380px;
    background: radial-gradient(circle at 40% 40%, #b8d4f0, #7aaede);
    top: -100px;
    left: -80px;
    animation: blobMove1 9s ease-in-out infinite;
}

body::after {
    width: 320px;
    height: 320px;
    background: radial-gradient(circle at 60% 60%, #c8dff2, #90bce2);
    bottom: -80px;
    right: -60px;
    animation: blobMove2 11s ease-in-out infinite;
}

.bg-blob {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(90px);
    opacity: 0.45;
}

.bg-blob-1 {
    width: 260px;
    height: 260px;
    background: radial-gradient(circle at 50% 50%, #d4e8f8, #a0ccec);
    top: 35%;
    left: 20%;
    animation: blobMove3 13s ease-in-out infinite;
}

.bg-blob-2 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle at 50% 50%, #c0d8f0, #8ab8e0);
    top: 15%;
    right: 10%;
    animation: blobMove1 15s ease-in-out infinite reverse;
}

@keyframes blobMove1 {
    0%   { transform: translate(0px, 0px) scale(1); }
    25%  { transform: translate(20px, -24px) scale(1.05); }
    50%  { transform: translate(-16px, 18px) scale(0.97); }
    75%  { transform: translate(22px, 12px) scale(1.03); }
    100% { transform: translate(0px, 0px) scale(1); }
}

@keyframes blobMove2 {
    0%   { transform: translate(0px, 0px) scale(1); }
    25%  { transform: translate(-22px, 18px) scale(1.04); }
    50%  { transform: translate(16px, -20px) scale(0.96); }
    75%  { transform: translate(-20px, -12px) scale(1.05); }
    100% { transform: translate(0px, 0px) scale(1); }
}

@keyframes blobMove3 {
    0%   { transform: translate(0px, 0px) scale(1); }
    33%  { transform: translate(-18px, 22px) scale(1.06); }
    66%  { transform: translate(22px, -16px) scale(0.95); }
    100% { transform: translate(0px, 0px) scale(1); }
}

/* ===== PAGE ===== */
.legal-page {
    position: relative;
    z-index: 1;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

/* ===== HEADER — LIQUID GLASS ===== */
.legal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: calc(14px + env(safe-area-inset-top)) 16px 14px 16px;
    position: sticky;
    top: calc(-1 * env(safe-area-inset-top));
    z-index: 10;

    background: rgba(235, 240, 246, 0.6);
    backdrop-filter: blur(48px) saturate(200%) brightness(1.08);
    -webkit-backdrop-filter: blur(48px) saturate(200%) brightness(1.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.85),
        inset 0 -1px 0 rgba(255, 255, 255, 0.2),
        0 4px 32px rgba(0, 0, 0, 0.06);
}

/* Блик сверху на хедере */
.legal-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.9) 30%,
        rgba(255, 255, 255, 1) 50%,
        rgba(255, 255, 255, 0.9) 70%,
        transparent 100%
    );
    pointer-events: none;
}

/* ===== BACK BTN — LIQUID GLASS ===== */
.back-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #007AFF;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;

    background: rgba(255, 255, 255, 0.42);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.68);
    box-shadow:
        0 2px 12px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(255, 255, 255, 0.2);
}

.back-btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.35) 0%, transparent 100%);
    border-radius: 50% 50% 0 0;
    pointer-events: none;
}

.back-btn:active {
    background: rgba(255, 255, 255, 0.28);
    transform: scale(0.92);
    box-shadow:
        0 1px 6px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.legal-title {
    font-size: 17px;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.88);
    letter-spacing: -0.2px;
}

/* Пустой элемент для баланса flex */
.header-spacer {
    width: 36px;
    flex-shrink: 0;
}

/* ===== CONTENT ===== */
.legal-content {
    flex: 1;
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
    padding: 24px 16px 60px 16px;
    position: relative;
    z-index: 1;
}

.legal-content h1 {
    font-size: 28px;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.88);
    margin-bottom: 8px;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.legal-date {
    font-size: 14px;
    color: rgba(0, 0, 0, 0.4);
    margin-bottom: 20px;
}

/* ===== INTRO BLOCK — LIQUID GLASS ===== */
.legal-intro {
    font-size: 16px;
    color: rgba(0, 0, 0, 0.82);
    line-height: 1.55;
    padding: 16px 18px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
    border-radius: 18px;

    background: rgba(255, 255, 255, 0.32);
    backdrop-filter: blur(40px) saturate(190%) brightness(1.06);
    -webkit-backdrop-filter: blur(40px) saturate(190%) brightness(1.06);
    border: 1px solid rgba(255, 255, 255, 0.62);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(255, 255, 255, 0.2);
}

.legal-intro::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 40%;
    background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, transparent 100%);
    border-radius: 18px 18px 0 0;
    pointer-events: none;
}

/* Боковой блик */
.legal-intro::after {
    content: '';
    position: absolute;
    top: 10%;
    left: 0;
    width: 3px;
    height: 40%;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(255, 255, 255, 0.8) 50%,
        transparent 100%
    );
    border-radius: 0 2px 2px 0;
    pointer-events: none;
}

/* ===== СЕКЦИИ — LIQUID GLASS КАРТОЧКИ ===== */
.legal-section {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    padding: 16px 18px;
    margin-bottom: 10px;

    background: rgba(255, 255, 255, 0.26);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow:
        0 2px 16px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.88),
        inset 0 -1px 0 rgba(255, 255, 255, 0.15);
}

.legal-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 40%;
    background: linear-gradient(180deg, rgba(255,255,255,0.18) 0%, transparent 100%);
    border-radius: 18px 18px 0 0;
    pointer-events: none;
}

/* ===== ТИПОГРАФИКА ===== */
.legal-content h2 {
    font-size: 18px;
    font-weight: 700;
    color: #007AFF;
    margin-bottom: 10px;
    letter-spacing: -0.3px;
}

.legal-content p {
    font-size: 15px;
    color: rgba(0, 0, 0, 0.72);
    line-height: 1.58;
    margin-bottom: 8px;
}

.legal-content p:last-child {
    margin-bottom: 0;
}

.legal-content ul {
    list-style: none;
    padding-left: 4px;
    margin-bottom: 8px;
}

.legal-content li {
    font-size: 15px;
    color: rgba(0, 0, 0, 0.72);
    line-height: 1.52;
    padding: 4px 0 4px 18px;
    position: relative;
}

.legal-content li::before {
    content: "•";
    color: #007AFF;
    font-weight: 700;
    position: absolute;
    left: 2px;
}

.legal-content a {
    color: #007AFF;
    text-decoration: none;
    transition: 0.2s;
}

.legal-content a:active {
    color: #0056CC;
    text-decoration: underline;
}

.legal-content b {
    font-weight: 600;
    color: rgba(0, 0, 0, 0.88);
}