/* =========================================
   ★ LEGAL PAGES — Shared Styles
   Used by: privacy.html, terms.html
   Depends on: css/style.css (root variables)
   ========================================= */

/* ===== LEGAL PAGE BASE ===== */
.legal-page { max-width: 900px; margin: 0 auto; padding: 40px 24px 80px; }

.legal-hero {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeUp .8s both cubic-bezier(.34,1.2,.64,1);
}
.legal-hero h1 {
    font-size: clamp(32px, 6vw, 56px);
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.1;
    margin: 16px 0 12px;
    color: var(--text-main);
}
.legal-hero p {
    font-size: clamp(14px, 2vw, 16px);
    color: var(--text-soft);
    max-width: 560px;
    margin: 0 auto 16px;
    line-height: 1.65;
}
.legal-updated {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-soft);
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* ===== TABLE OF CONTENTS ===== */
.legal-toc {
    padding: 24px 28px;
    border-radius: 22px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    box-shadow: 0 20px 40px -22px var(--glass-shadow), inset 0 1px 2px -1px var(--glass-highlight);
    margin-bottom: 30px;
    animation: fadeUp .8s .15s both cubic-bezier(.34,1.2,.64,1);
}
.legal-toc h2 {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--text-soft);
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.legal-toc h2 svg { color: #007aff; }
.legal-toc ol {
    list-style: none;
    counter-reset: toc;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 6px;
}
.legal-toc li { counter-increment: toc; }
.legal-toc a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 11px;
    text-decoration: none;
    color: var(--text-main);
    font-size: 13px;
    font-weight: 600;
    transition: all .25s ease;
}
.legal-toc a::before {
    content: counter(toc);
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 7px;
    background: color-mix(in srgb, #007aff 15%, transparent);
    color: #007aff;
    font-size: 11px;
    font-weight: 800;
    flex-shrink: 0;
}
.legal-toc a:hover {
    background: color-mix(in srgb, #007aff 10%, transparent);
    transform: translateX(3px);
}

/* ===== CONTENT ===== */
.legal-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: fadeUp .8s .3s both cubic-bezier(.34,1.2,.64,1);
}
.legal-section {
    padding: 26px 30px;
    border-radius: 22px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    box-shadow: 0 20px 40px -22px var(--glass-shadow), inset 0 1px 2px -1px var(--glass-highlight);
    scroll-margin-top: 110px;
}
.legal-section h2 {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -.4px;
    color: var(--text-main);
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.legal-section h2 .num {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, #ff2a5f, #bf5af2 55%, #007aff);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    flex-shrink: 0;
    box-shadow: 0 8px 18px -8px rgba(191,90,242,.6);
}
.legal-section h3 {
    font-size: 14.5px;
    font-weight: 800;
    color: var(--text-main);
    margin: 18px 0 8px;
}
.legal-section p {
    font-size: 14px;
    line-height: 1.75;
    color: var(--text-soft);
    margin: 0 0 12px;
}
.legal-section p:last-child { margin-bottom: 0; }
.legal-section strong { color: var(--text-main); font-weight: 700; }

.legal-section ul, .legal-section ol {
    padding: 0;
    margin: 10px 0 12px;
    list-style: none;
}
.legal-section ul li, .legal-section ol li {
    position: relative;
    padding-left: 24px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-soft);
    margin-bottom: 6px;
}
.legal-section ul li::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 10px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff2a5f, #bf5af2);
}
.legal-section ol { counter-reset: list; }
.legal-section ol li {
    counter-increment: list;
    padding-left: 30px;
}
.legal-section ol li::before {
    content: counter(list);
    position: absolute;
    left: 0;
    top: 2px;
    width: 20px;
    height: 20px;
    border-radius: 6px;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, #007aff 15%, transparent);
    color: #007aff;
    font-size: 10.5px;
    font-weight: 800;
}
.legal-section a {
    color: #007aff;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px dashed currentColor;
    transition: color .2s ease;
}
.legal-section a:hover { color: #bf5af2; }

.legal-callout {
    padding: 14px 18px;
    border-radius: 14px;
    background: color-mix(in srgb, #007aff 10%, transparent);
    border: 1px solid color-mix(in srgb, #007aff 30%, transparent);
    color: var(--text-main);
    font-size: 13.5px;
    line-height: 1.65;
    margin: 14px 0;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.legal-callout svg { flex-shrink: 0; color: #007aff; margin-top: 2px; }
.legal-callout.warn {
    background: color-mix(in srgb, #ff9500 10%, transparent);
    border-color: color-mix(in srgb, #ff9500 35%, transparent);
}
.legal-callout.warn svg { color: #ff9500; }
.legal-callout.danger {
    background: color-mix(in srgb, #ff3b30 10%, transparent);
    border-color: color-mix(in srgb, #ff3b30 35%, transparent);
}
.legal-callout.danger svg { color: #ff3b30; }

/* =========================================
   ★ 3D MODELS PROMO CARD
   ========================================= */
.legal-promo {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    margin-top: 30px;
    border-radius: 20px;
    background: linear-gradient(135deg,
        color-mix(in srgb, #00c7be 14%, var(--card-bg)),
        color-mix(in srgb, #007aff 14%, var(--card-bg)));
    border: 1px solid color-mix(in srgb, #00c7be 35%, var(--card-border));
    box-shadow:
        0 20px 40px -22px var(--glass-shadow),
        inset 0 1px 2px -1px var(--glass-highlight);
    text-decoration: none;
    color: var(--text-main);
    transition:
        transform .35s cubic-bezier(.34,1.4,.64,1),
        box-shadow .3s ease,
        border-color .3s ease;
    animation: fadeUp .8s .4s both cubic-bezier(.34,1.2,.64,1);
}
.legal-promo:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, #00c7be 60%, var(--card-border));
    box-shadow:
        0 30px 50px -25px var(--glass-shadow),
        0 0 0 1px color-mix(in srgb, #00c7be 30%, transparent),
        inset 0 1px 2px -1px var(--glass-highlight);
}
.legal-promo:active { transform: translateY(-1px) scale(.99); }

.legal-promo-ic {
    flex-shrink: 0;
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, #00c7be, #007aff);
    box-shadow: 0 12px 26px -10px rgba(0,199,190,.65);
    transition: transform .4s cubic-bezier(.34,1.4,.64,1);
}
.legal-promo:hover .legal-promo-ic {
    transform: scale(1.08) rotate(-6deg);
}

.legal-promo-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.legal-promo-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .8px;
    text-transform: uppercase;
    color: #00c7be;
}
.legal-promo-title {
    font-size: 15.5px;
    font-weight: 800;
    letter-spacing: -.3px;
    color: var(--text-main);
    line-height: 1.3;
    margin: 0;
}
.legal-promo-desc {
    font-size: 12.5px;
    color: var(--text-soft);
    margin: 0;
    line-height: 1.4;
}

.legal-promo-arrow {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--text-main);
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    transition: all .3s cubic-bezier(.34,1.4,.64,1);
}
.legal-promo:hover .legal-promo-arrow {
    background: linear-gradient(135deg, #00c7be, #007aff);
    color: #fff;
    border-color: transparent;
    transform: translateX(3px);
}

@media (max-width: 520px) {
    .legal-promo {
        padding: 14px 16px;
        gap: 12px;
        border-radius: 16px;
    }
    .legal-promo-ic { width: 46px; height: 46px; border-radius: 13px; }
    .legal-promo-ic svg { width: 20px; height: 20px; }
    .legal-promo-title { font-size: 14px; }
    .legal-promo-desc { font-size: 11.5px; }
    .legal-promo-arrow { width: 34px; height: 34px; }
}

/* ===== NAV 3D HIGHLIGHT ===== */
.nav-btn.nav-3d svg {
    color: #00c7be;
    stroke: #00c7be;
}
.nav-btn.nav-3d:hover {
    color: var(--icon-active);
}

/* ===== BOTTOM CTA ===== */
.legal-footer-cta {
    text-align: center;
    padding: 32px 24px;
    margin-top: 40px;
    border-radius: 24px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    box-shadow: 0 20px 40px -22px var(--glass-shadow), inset 0 1px 2px -1px var(--glass-highlight);
    animation: fadeUp .8s .45s both cubic-bezier(.34,1.2,.64,1);
}
.legal-footer-cta h3 {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.4px;
    margin: 0 0 8px;
    color: var(--text-main);
}
.legal-footer-cta p {
    font-size: 14px;
    color: var(--text-soft);
    margin: 0 0 20px;
    line-height: 1.6;
}
.legal-btns {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}
.legal-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 14px;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    transition: all .3s cubic-bezier(.34,1.4,.64,1);
}
.legal-btn.primary {
    color: #fff;
    background: linear-gradient(135deg, #ff2a5f 0%, #bf5af2 55%, #007aff 100%);
    background-size: 200% 200%;
    box-shadow: 0 14px 28px -12px rgba(191,90,242,.65);
}
.legal-btn.primary:hover {
    transform: translateY(-2px);
    background-position: 100% 50%;
    box-shadow: 0 20px 38px -14px rgba(191,90,242,.85);
}
.legal-btn.ghost {
    color: var(--text-main);
    background: color-mix(in srgb, var(--card-bg) 90%, transparent);
    border: 1px solid var(--card-border);
}
.legal-btn.ghost:hover {
    transform: translateY(-2px);
    background: color-mix(in srgb, var(--text-main) 8%, var(--card-bg));
}

/* ===== BACK TO TOP ===== */
.back-to-top {
    position: fixed;
    bottom: 26px;
    right: 26px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--card-border);
    background: var(--glass-bg);
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    color: var(--text-main);
    cursor: pointer;
    display: grid;
    place-items: center;
    box-shadow:
        0 14px 30px -12px var(--glass-shadow),
        inset 0 1px 2px -1px var(--glass-highlight);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all .35s cubic-bezier(.34,1.4,.64,1);
    z-index: 100;
}
.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover {
    color: #007aff;
    transform: translateY(-3px) scale(1.06);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
    .legal-page { padding: 24px 16px 60px; }
    .legal-section { padding: 22px 20px; border-radius: 18px; }
    .legal-section h2 { font-size: 16.5px; gap: 10px; }
    .legal-section h2 .num { width: 28px; height: 28px; font-size: 11px; }
    .legal-toc { padding: 18px 20px; }
    .legal-toc ol { grid-template-columns: 1fr; }
    .legal-footer-cta { padding: 26px 20px; }
    .legal-hero { margin-bottom: 30px; }
}

@media (prefers-reduced-motion: reduce) {
    .legal-hero, .legal-toc, .legal-content,
    .legal-footer-cta, .back-to-top, .legal-promo {
        animation: none !important;
        transition-duration: .01ms !important;
    }
}

        /* Ad container — uses existing variables */
        .ads-container {
            max-width: 900px;
            margin: 30px auto 0;
            padding: 0 24px;
            text-align: center;
            min-height: 90px;
            overflow: hidden;
        }
        .ads-container ins {
            display: block;
            width: 100%;
            border-radius: 16px;
            overflow: hidden;
        }
        .ads-label {
            display: block;
            font-size: 10px;
            font-weight: 800;
            letter-spacing: 1.5px;
            text-transform: uppercase;
            color: var(--text-soft);
            margin-bottom: 8px;
            opacity: .65;
        }

        /* Cookie consent banner */
        .cookie-banner {
            position: fixed;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%) translateY(120%);
            width: calc(100% - 32px);
            max-width: 560px;
            padding: 16px 20px;
            border-radius: 20px;
            background: var(--pill-bg);
            backdrop-filter: blur(40px) saturate(200%);
            -webkit-backdrop-filter: blur(40px) saturate(200%);
            border: 1px solid var(--card-border);
            box-shadow:
                0 24px 50px -12px var(--glass-shadow),
                inset 0 1px 2px -1px var(--glass-highlight);
            z-index: 99998;
            display: flex;
            align-items: center;
            gap: 14px;
            opacity: 0;
            visibility: hidden;
            transition:
                transform .55s cubic-bezier(.34,1.2,.64,1),
                opacity .4s ease,
                visibility .4s ease;
        }
        .cookie-banner.show {
            opacity: 1;
            visibility: visible;
            transform: translateX(-50%) translateY(0);
        }
        .cookie-banner p {
            flex: 1;
            margin: 0;
            font-size: 13px;
            line-height: 1.5;
            color: var(--text-main);
            font-weight: 500;
        }
        .cookie-banner a {
            color: #007aff;
            font-weight: 700;
            text-decoration: none;
            border-bottom: 1px dashed currentColor;
        }
        .cookie-banner a:hover { color: #bf5af2; }
        .cookie-banner-actions {
            display: flex;
            gap: 8px;
            flex-shrink: 0;
        }
        .cookie-banner button {
            padding: 9px 16px;
            border-radius: 12px;
            border: none;
            font-family: inherit;
            font-size: 12.5px;
            font-weight: 800;
            cursor: pointer;
            white-space: nowrap;
            transition: transform .25s cubic-bezier(.34,1.4,.64,1), box-shadow .25s ease;
        }
        .cookie-banner .btn-accept {
            color: #fff;
            background: linear-gradient(135deg, #ff2a5f, #bf5af2 55%, #007aff);
            box-shadow: 0 10px 22px -10px rgba(191,90,242,.65);
        }
        .cookie-banner .btn-accept:hover {
            transform: translateY(-2px);
            box-shadow: 0 14px 26px -10px rgba(191,90,242,.85);
        }
        .cookie-banner .btn-accept:active { transform: scale(.96); }

        @media (max-width: 520px) {
            .cookie-banner {
                flex-direction: column;
                align-items: stretch;
                padding: 14px 16px;
                gap: 12px;
            }
            .cookie-banner-actions { justify-content: flex-end; }
            .cookie-banner button { flex: 1; justify-content: center; }
        }

        @media (prefers-reduced-motion: reduce) {
            .cookie-banner,
            .cookie-banner button {
                transition-duration: .01ms !important;
            }
        }
    