/* ── Terms of Service Redesign (Blue Glassmorphism) ──────────────── */

:root {
    --tos-blue: #1962f7;
    --tos-blue-l: #2b76ff;
    --tos-blue-glow: rgba(25, 98, 247, 0.25);
    --tos-bg-glass: rgba(16, 20, 34, 0.45);
    --tos-border: rgba(25, 98, 247, 0.2);
    --tos-border-highlight: rgba(25, 98, 247, 0.4);
}

/* ── Hero ──────────────────────────────────────────────── */
.tos-hero {
    padding: 20px 0 2rem !important;
    margin-top: 0 !important;
    text-align: center;
    position: relative;
    z-index: 10;
}

.tos-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(25, 98, 247, 0.1);
    border: 1px solid rgba(25, 98, 247, 0.25);
    border-radius: 50px;
    padding: 6px 20px;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--tos-blue-l);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 16px;
    backdrop-filter: blur(8px);
}

.tos-hero h1 {
    font-size: clamp(2.6rem, 7vw, 4.2rem);
    font-weight: 900;
    color: #fff;
    line-height: 1.15;
    letter-spacing: -1.5px;
    text-shadow: 0 0 18px rgba(255, 255, 255, 0.9), 0 0 40px rgba(255, 255, 255, 0.4), 0 0 70px rgba(255, 255, 255, 0.15);
}

.tos-hero h1 .tos-blue-txt {
    color: var(--tos-blue);
    background: linear-gradient(135deg, var(--tos-blue-l) 20%, var(--tos-blue) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(25, 98, 247, 0.8), 0 0 45px rgba(25, 98, 247, 0.4);
    animation: stocksGlow 2.8s ease-in-out infinite;
}

.tos-hero p {
    font-size: 1rem;
    color: #fff;
    max-width: 580px;
    margin: 1.5rem auto 1.5rem;
    line-height: 1.6;
}

/* ── Search Bar ────────────────────────────────────────── */
.tos-search-wrap {
    max-width: 520px;
    margin: 0 auto;
    position: relative;
    z-index: 30;
}
.tos-search-input-wrap {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(25, 98, 247, 0.15);
    border-radius: 18px;
    padding: 2px;
    backdrop-filter: blur(12px);
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.tos-search-input-wrap:focus-within {
    border-color: var(--tos-blue);
    background: rgba(25, 98, 247, 0.05);
    box-shadow: 0 0 35px rgba(25, 98, 247, 0.25), 0 10px 40px rgba(0,0,0,0.3);
    transform: translateY(-2px);
}
.tos-search-input-wrap i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--tos-blue-l);
    font-size: 1.1rem;
    opacity: 0.6;
}
.tos-search-input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    padding: 14px 20px 14px 52px;
    color: #fff;
    font-family: 'Jost', sans-serif;
    font-size: 1rem;
    font-weight: 500;
}
.tos-search-input::placeholder { color: rgba(255, 255, 255, 0.3); }

/* Suggestion chip */
.tos-search-hint {
    margin-top: 12px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.3);
    display: flex;
    justify-content: center;
    gap: 8px;
}
.tos-search-hint span { color: var(--tos-blue-l); opacity: 0.7; cursor: pointer; border-bottom: 1px dashed rgba(25, 98, 247, 0.3); }

/* ── Tab Switcher (The Main Shifter) ────────────────────── */
.tos-tabs {
    display: flex;
    gap: 0.5rem;
    background: rgba(25, 98, 247, 0.04);
    border: 1px solid rgba(25, 98, 247, 0.2);
    border-radius: 20px;
    padding: 0.5rem;
    width: max-content;
    max-width: 95%;
    margin: 3rem auto 0;
    position: relative;
    backdrop-filter: blur(12px);
    z-index: 20;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    justify-content: center;
}
.tos-tabs::-webkit-scrollbar { display: none; }

.tos-tab-btn {
    padding: 0.85rem 1.8rem;
    border-radius: 15px;
    border: 1px solid transparent;
    background: transparent;
    color: rgba(255, 255, 255, 0.4);
    font-family: 'Jost', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.tos-tab-btn.active {
    background: linear-gradient(135deg, rgba(25, 98, 247, 0.2), rgba(43, 118, 255, 0.08));
    border-color: rgba(25, 98, 247, 0.35);
    color: #fff;
    box-shadow: 0 0 25px rgba(25, 98, 247, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    text-shadow: 0 0 12px rgba(25, 98, 247, 0.6);
}

.tos-tab-btn:not(.active):hover {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(25, 98, 247, 0.08);
    transform: translateY(-2px);
}

/* ── Panels ────────────────────────────────────────────── */
.tos-panels {
    max-width: 900px;
    margin: 1.5rem auto 100px;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

.tos-panel {
    display: none;
}

.tos-panel.active {
    display: block;
    animation: panel-reveal 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes panel-reveal {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Category Labels ───────────────────────────────────── */
.tos-category-label {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--tos-blue-l);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 2rem;
    padding-left: 5px;
    border-left: 3px solid var(--tos-blue);
    line-height: 1;
}

/* ── Group Cards ───────────────────────────────────────── */
.tos-group {
    padding: 0;
    margin-bottom: 2rem;
    background: linear-gradient(145deg, rgba(10,14,26,0.85) 0%, rgba(6,10,20,0.9) 100%);
    border: 1px solid rgba(25, 98, 247, 0.18);
    border-radius: 24px;
    backdrop-filter: blur(20px);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.03);
    position: relative;
}

/* top accent line */
.tos-group::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--tos-blue), var(--tos-blue-l), var(--tos-blue), transparent);
    background-size: 200%;
    animation: shimmer 4s linear infinite;
    z-index: 2;
}

.tos-group:hover {
    border-color: rgba(25, 98, 247, 0.45);
    transform: translateY(-4px);
    box-shadow: 0 0 0 1px rgba(25,98,247,.2), 0 24px 56px rgba(0,0,0,0.5), 0 0 30px rgba(25,98,247,0.08);
}

.tos-group-header-static {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 1.75rem 1.75rem 1.5rem;
    position: relative;
}

/* divider */
.tos-group-header-static::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1.75rem;
    right: 1.75rem;
    height: 1px;
    background: linear-gradient(90deg, rgba(25,98,247,0.5) 0%, rgba(25,98,247,0.15) 60%, transparent 100%);
}

.tos-group-icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    background: rgba(25, 98, 247, 0.1);
    border: 1px solid rgba(25, 98, 247, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tos-blue-l);
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 0 16px rgba(25,98,247,0.2);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tos-group:hover .tos-group-icon {
    background: rgba(25,98,247,0.18);
    box-shadow: 0 0 24px rgba(25,98,247,0.4);
    transform: scale(1.08);
}

.tos-group-icon i { text-shadow: 0 0 12px rgba(25,98,247,0.8); }

.tos-group-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.2px;
    line-height: 1.3;
}

.tos-group-subtitle {
    display: block;
    font-size: 0.72rem;
    color: var(--tos-blue-l);
    font-weight: 700;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    opacity: 0.7;
}

/* Copy Link Icon */
.tos-link-copy {
    opacity: 0;
    margin-left: auto;
    color: var(--tos-blue-l);
    font-size: 0.85rem;
    transition: all 0.2s ease;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    background: rgba(25,98,247,0.06);
    border: 1px solid rgba(25,98,247,0.12);
    flex-shrink: 0;
}
.tos-group:hover .tos-link-copy { opacity: 0.6; }
.tos-link-copy:hover { opacity: 1 !important; background: rgba(25,98,247,0.15); transform: scale(1.1); }

/* ── Refined Pill Tabs ── */
.tos-subnav-wrap {
    display: flex;
    justify-content: center;
    margin: -1rem auto 3rem;
    padding: 0 20px;
    position: relative;
    z-index: 50;
}
.tos-subnav {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(13, 17, 23, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    padding: 8px;
    backdrop-filter: blur(16px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}
.tos-chip {
    padding: 0.75rem 1.6rem;
    border-radius: 100px;
    border: 1px solid transparent;
    background: transparent;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}
.tos-chip i { 
    font-size: 1.1rem; 
    opacity: 0.6;
    transition: all 0.3s ease;
}
.tos-chip:hover {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.04);
}
.tos-chip.active {
    background: linear-gradient(135deg, rgba(25, 98, 247, 0.15), rgba(25, 98, 247, 0.05));
    border-color: rgba(25, 98, 247, 0.3);
    color: #fff;
    box-shadow: 0 0 20px rgba(25, 98, 247, 0.2);
    text-shadow: 0 0 8px rgba(25, 98, 247, 0.4);
}
.tos-chip.active i { 
    opacity: 1; 
    color: var(--tos-blue-l);
}

/* ── Content ── */
.tos-content-open {
    font-size: 0.95rem;
    color: #fff;
    line-height: 1.85;
    padding: 1.5rem 1.75rem 1.75rem;
}
.tos-content-open strong, .tos-content-open b { 
    color: #fff; 
    font-weight: 800; 
}

/* ── Lists ── */
.tos-content-open ul, .tos-content-open ol { 
    padding-left: 0; 
    margin-bottom: 1.5rem; 
}

/* Bullet Lists (Dots) */
.tos-content-open ul { list-style-type: none; }
.tos-content-open ul li { 
    position: relative; 
    padding-left: 24px; 
    margin-bottom: 0.8rem; 
}
.tos-content-open ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--tos-blue-l);
    font-size: 1.4rem;
    line-height: 1;
    top: -2px;
    font-weight: 900;
    opacity: 0.8;
    font-family: inherit;
    transition: all 0.2s ease;
}
.tos-content-open ul li:hover::before {
    opacity: 1;
    transform: translateX(3px);
}

/* Ordered Lists (Numbering) */
.tos-content-open ol { 
    list-style-type: decimal; 
    padding-left: 28px; 
    color: #fff; /* Color for numbers */
}
.tos-content-open ol li { 
    padding-left: 8px; 
    margin-bottom: 0.8rem;
    color: #fff; /* Reset text to pure white */
}
.tos-content-open ol li::marker {
    color: var(--tos-blue-l);
    font-weight: 800;
}

/* Helper for any plain paragraphs that should be spaced like list content */
.tos-content-open p { 
    margin-bottom: 1.25rem; 
    line-height: 1.85;
}

/* Filtering animations */
.tos-term-group {
    display: none;
    animation: fadeInTos 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes fadeInTos {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Mobile POV Transformation ────────────────────────── */
@media (max-width: 768px) {
    .tos-hero {
        padding: 60px 0 2.5rem !important;
    }
    .tos-hero h1 {
        font-size: clamp(2.4rem, 10vw, 3.2rem);
        letter-spacing: -2px;
        text-shadow: 0 0 15px rgba(255, 255, 255, 0.6) !important;
    }
    .tos-subnav-wrap {
        justify-content: flex-start;
        margin: 0 auto 2.5rem;
        padding: 0 16px;
        overflow-x: auto;
        scrollbar-width: none;
    }
    .tos-subnav-wrap::-webkit-scrollbar { display: none; }
    .tos-subnav {
        flex-wrap: nowrap;
        width: max-content;
        border-radius: 16px;
        padding: 6px;
        gap: 0.4rem;
    }
    .tos-chip {
        padding: 0.6rem 1.25rem;
        font-size: 0.82rem;
        border-radius: 12px;
    }
    .tos-panels {
        padding: 0 16px;
    }
    .tos-group {
        border-radius: 18px;
        margin-bottom: 1.25rem;
    }
    .tos-group-header-static {
        padding: 1.25rem 1.25rem 1.1rem;
        gap: 12px;
    }
    .tos-group-header-static::after {
        left: 1.25rem;
        right: 1.25rem;
    }
    .tos-content-open {
        padding: 1.25rem 1.25rem 1.5rem;
    }
    .tos-group-icon {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }
    .tos-group-title {
        font-size: 1.1rem;
    }
    .tos-content-open {
        font-size: 0.92rem;
        line-height: 1.75;
    }
}
