@font-face {
    font-family: "DelaGothicOne";
    src: url("../fonts/DelaGothicOne-Regular.ttf") format("truetype");
    font-display: swap;
}

:root {
    --gold-primary: #20d4f8;
    --gold-secondary: #16647f;
    --gold-light: #20d4f8;
    --panel-bg: rgba(18, 24, 38, 0.92);
    --text-main: #e0e6ed;
    --text-muted: #8b9bb4;
}

.terms-page {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-main);
    min-height: 100vh;
    background-color: #050810;

    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    padding: 20px 0 60px;
}

.terms-page #particles-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.terms-rune-bg {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(800px, 78vw);
    height: min(800px, 78vw);
    border: 1px dashed rgba(212, 175, 55, 0.15);
    border-radius: 50%;
    opacity: 0.35;
    z-index: 1;
    pointer-events: none;
    animation: terms-rotate-rune 120s linear infinite;
}

@keyframes terms-rotate-rune {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.terms-scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    width: 0;
    background: linear-gradient(90deg, var(--gold-secondary), var(--gold-light));
    z-index: 1000;
    box-shadow: 0 0 10px var(--gold-primary);
}

.terms-container {
    width: min(1400px, calc(100% - 26px));
    margin: 100px auto 0;
    padding-top: 40px;
    display: flex;
    gap: 34px;
    position: relative;
    z-index: 2;
}

.terms-sidebar {
    width: 300px;
    position: sticky;
    top: 90px;
    align-self: flex-start;
}

.terms-nav-menu {
    list-style: none;
    border: 1px solid #2dc5e52b;
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    position: relative;
    overflow: hidden;
}

.terms-nav-menu::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--gold-secondary), var(--gold-light));
}

.terms-nav-item {
    margin-bottom: 8px;
}

.terms-nav-item a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 14px;
}

.terms-nav-item a:hover,
.terms-nav-item a.active {
    color: var(--gold-light);
    background: #2dc5e52b;
    transform: translateX(4px);
}

.terms-nav-item i {
    color: var(--gold-secondary);
}

.terms-update-badge {
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid var(--gold-secondary);
    padding: 12px;
    border-radius: 8px;
    color: var(--gold-light);
    font-size: 13px;
}

.terms-main {
    flex: 1;
    min-width: 0;
}

.terms-header {
    text-align: center;
    margin-bottom: 32px;
}

.terms-main-title {
    font-family: "DelaGothicOne", "Segoe UI", Tahoma, sans-serif;
    font-size: clamp(42px, 5vw, 84px);
    text-transform: uppercase;
    color: transparent;
    -webkit-text-stroke: 2px #16647f;
    background: linear-gradient(180deg, #ffffff 20%, #16647f 60%, #20d4f8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    position: relative;
    text-shadow: 0 0 30px #20d4f8;
    letter-spacing: 4px;
}

.terms-main-title::after {
    content: attr(data-title);
    position: absolute;
    inset: 0;
    color: transparent;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    animation: shimmer 3s infinite linear;
    pointer-events: none;
}

.terms-subtitle {
    font-family: "NotoSerifCJKsc-Bold", "Times New Roman", serif;
    font-size: 24px;
    color: #cccccc;
    margin-top: 10px;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.terms-content-panel {
    border: 1px solid #2dc5e52b;
    border-radius: 8px;
    padding: 42px;
    position: relative;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.45);
}

.terms-corner {
    position: absolute;
    width: 36px;
    height: 36px;
    border: 2px solid var(--gold-secondary);
}

.terms-corner.top-left {
    top: -1px;
    left: -1px;
    border-right: none;
    border-bottom: none;
}

.terms-corner.top-right {
    top: -1px;
    right: -1px;
    border-left: none;
    border-bottom: none;
}

.terms-corner.bottom-left {
    bottom: -1px;
    left: -1px;
    border-right: none;
    border-top: none;
}

.terms-corner.bottom-right {
    bottom: -1px;
    right: -1px;
    border-left: none;
    border-top: none;
}

.terms-section {
    margin-bottom: 42px;
    scroll-margin-top: 110px;
}

.terms-section-title {
    font-family: 'Cinzel Decorative', Georgia, 'Times New Roman', serif;
    font-size: clamp(21px, 2.5vw, 28px);
    color: var(--gold-primary);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.18);
    padding-bottom: 12px;
}

.terms-section-title i {
    color: var(--gold-secondary);
}

.terms-section-content {
    font-size: 16px;
    line-height: 1.72;
    color: #c0c8d8;
}

.terms-section-content p {
    margin-bottom: 14px;
}

.terms-list {
    list-style: none;
    margin: 12px 0;
    padding-left: 8px;
}

.terms-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.terms-list i {
    color: var(--gold-secondary);
    margin-top: 2px;
}

.terms-link {
    color: var(--gold-light);
}

.terms-link:hover {
    color: #fff;
}

.terms-divider {
    text-align: center;
    color: rgba(212, 175, 55, 0.25);
    font-size: 12px;
    margin: 24px 0 32px;
    letter-spacing: 8px;
}

.terms-security-footer {
    margin-top: 50px;
    text-align: center;
    padding: 30px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.05) 0%, rgba(10, 17, 40, 0) 70%);
    border-top: 1px solid rgba(212, 175, 55, 0.12);
}

.terms-security-footer .shield {
    font-size: 42px;
    color: var(--gold-primary);
    margin-bottom: 10px;
}

.terms-security-footer .title {
    font-family: 'Cinzel Decorative', Georgia, 'Times New Roman', serif;
    font-size: 20px;
    color: var(--gold-light);
    letter-spacing: 2px;
}

.terms-security-footer .sub {
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 14px;
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

@media (max-width: 1120px) {
    .terms-container {
        display: block;
        padding-top: 24px;
    }

    .terms-sidebar {
        width: 100%;
        position: static;
        margin-bottom: 16px;
    }

    .terms-nav-menu {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 4px;
    }

    .terms-nav-item {
        margin-bottom: 0;
    }

    .terms-content-panel {
        padding: 24px;
    }
}

@media (max-width: 720px) {
    .terms-page {
        padding-top: 10px;
    }

    .terms-container {
        width: calc(100% - 14px);
        padding-top: 18px;
    }

    .terms-nav-menu {
        grid-template-columns: 1fr;
        padding: 18px;
    }

    .terms-subtitle {
        font-size: 18px;
    }

    .terms-content-panel {
        padding: 16px;
    }

    .terms-section-content {
        font-size: 14px;
    }
}
