/* ================== ПОЛЬЗОВАТЕЛЬСКОЕ СОГЛАШЕНИЕ — МОДАЛЬНОЕ ОКНО ================== */
.modal-overlay-terms {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse 80% 60% at 50% 30%, rgba(212, 175, 55, 0.18), transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 80%, rgba(180, 130, 70, 0.14), transparent 60%),
        rgba(26, 18, 12, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 21000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0s linear 0.35s;
    transform: translateZ(0);
}

.modal-overlay-terms.active {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.35s ease, visibility 0s linear 0s;
}

.modal-container-terms {
    position: relative;
    width: 90%;
    max-width: 800px;
    max-height: 86vh;
    background:
        radial-gradient(circle at 50% 0%, rgba(212, 175, 55, 0.16), transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(180, 130, 70, 0.14), transparent 60%),
        linear-gradient(180deg, rgba(46, 32, 23, 0.98), rgba(26, 18, 12, 0.99));
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border: 1px solid var(--line-2);
    border-radius: var(--r-xl);
    box-shadow:
        0 32px 70px rgba(0, 0, 0, 0.7),
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 0 60px rgba(212, 175, 55, 0.20);
    overflow: hidden;
    transform: translate3d(0, 24px, 0);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
    will-change: transform, opacity;
}

.modal-overlay-terms.active .modal-container-terms {
    transform: translate3d(0, 0, 0);
    opacity: 1;
}

.modal-container-terms::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent) 30%, var(--accent-3) 50%, var(--accent) 70%, transparent);
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.55);
    z-index: 1;
    clip-path: none;
    width: 100%;
    opacity: 1;
    background-color: transparent;
}

.modal-container-terms::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--line-2), transparent);
    z-index: 1;
    clip-path: none;
    width: 100%;
    opacity: 1;
    background-color: transparent;
}

.modal-header-terms {
    position: relative;
    z-index: 2;
    padding: 26px 32px 20px;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title-terms {
    font-family: var(--font-display);
    font-size: clamp(20px, 2.6vw, 26px);
    color: #fff;
    letter-spacing: -0.015em;
    font-weight: 700;
    text-transform: none;
    text-shadow: none;
    margin: 0;
}

.modal-close-terms {
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    color: var(--text);
    font-size: 20px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.25s ease;
    line-height: 1;
}

.modal-close-terms:hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
    border-color: var(--line-strong);
    color: #fff;
    transform: rotate(90deg);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.22);
}

.modal-content-terms {
    position: relative;
    z-index: 2;
    padding: 26px 32px;
    max-height: calc(86vh - 130px);
    overflow-y: auto;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.65;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.modal-content-terms::-webkit-scrollbar {
    width: 8px;
}

.modal-content-terms::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 4px;
}

.modal-content-terms::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent), #8b6f47);
    border-radius: 4px;
    transition: background 0.2s ease;
}

.modal-content-terms::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #f4d978, #b88848);
}

.modal-content-terms h2 {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.01em;
    margin: 28px 0 12px;
    text-shadow: none;
}

.modal-content-terms h2:first-child {
    margin-top: 0;
}

.modal-content-terms p {
    margin-bottom: 12px;
}

.modal-content-terms ul {
    margin: 8px 0 14px 18px;
    padding-left: 18px;
}

.modal-content-terms li {
    margin-bottom: 6px;
}

.modal-content-terms li::marker {
    color: var(--accent);
}

.modal-content-terms strong {
    color: #fff;
    font-weight: 600;
}

@media (max-width: 900px) {
    .modal-container-terms {
        width: 95%;
        max-height: 92vh;
    }

    .modal-header-terms {
        padding: 22px 22px 16px;
    }

    .modal-content-terms {
        padding: 22px;
        max-height: calc(92vh - 110px);
    }
}

@media (max-width: 640px) {
    .modal-content-terms {
        padding: 18px;
        font-size: 14px;
    }

    .modal-content-terms h2 {
        font-size: 17px;
        margin: 22px 0 10px;
    }
}
