*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0D1B2A;
    --secondary: #1B263B;
    --accent: #00D9FF;
    --accent-alt: #7B61FF;
    --success: #00E676;
    --text: #E0E1DD;
    --text-muted: #778DA9;
    --gradient-main: linear-gradient(135deg, #00D9FF 0%, #7B61FF 50%, #FF006E 100%);
    --gradient-card: linear-gradient(145deg, rgba(27, 38, 59, 0.9), rgba(13, 27, 42, 0.95));
    --glow: 0 0 40px rgba(0, 217, 255, 0.3);
    --font-main: 'Outfit', sans-serif;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-main);
    background: var(--primary);
    color: var(--text);
    line-height: 1.7;
}

/* Animated Background */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.bg-animation::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(0, 217, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(123, 97, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 0, 110, 0.06) 0%, transparent 40%);
    animation: bgFloat 20s ease-in-out infinite;
}

@keyframes bgFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(5deg); }
    66% { transform: translate(-20px, 20px) rotate(-5deg); }
}

.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 217, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 217, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 0;
    pointer-events: none;
}

/* Page Container */
.termos-container {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}

/* Header */
.termos-header {
    text-align: center;
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(0, 217, 255, 0.15);
}

.termos-header-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}

.termos-header-logo img {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    box-shadow: var(--glow);
}

.termos-header-logo h1 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.termos-header-logo .emi {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.termos-header-logo .tron {
    color: var(--text);
}

.termos-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.termos-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.termos-header .update-date {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 8px 16px;
    background: rgba(0, 217, 255, 0.08);
    border: 1px solid rgba(0, 217, 255, 0.15);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 500;
}

/* Navigation Index */
.termos-nav {
    background: var(--gradient-card);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 217, 255, 0.12);
    border-radius: 16px;
    padding: 24px 28px;
    margin-bottom: 32px;
}

.termos-nav h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.termos-nav ul {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.termos-nav ul li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.termos-nav ul li a:hover {
    color: var(--accent);
    background: rgba(0, 217, 255, 0.06);
}

.termos-nav ul li a .nav-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: rgba(0, 217, 255, 0.1);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* Collapsible Sections */
.termos-section {
    background: var(--gradient-card);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 217, 255, 0.1);
    border-radius: 16px;
    margin-bottom: 16px;
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.termos-section:hover {
    border-color: rgba(0, 217, 255, 0.2);
}

.termos-section.active {
    border-color: rgba(0, 217, 255, 0.25);
    box-shadow: 0 4px 30px rgba(0, 217, 255, 0.08);
}

.termos-section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    cursor: pointer;
    user-select: none;
    transition: background 0.3s ease;
}

.termos-section-header:hover {
    background: rgba(0, 217, 255, 0.04);
}

.termos-section-header .section-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(0, 217, 255, 0.1);
    color: var(--accent);
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.termos-section.active .section-icon {
    background: var(--accent);
    color: var(--primary);
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.3);
}

.termos-section-header .section-title {
    flex: 1;
}

.termos-section-header .section-title h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
}

.termos-section-header .section-title span {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 400;
}

.termos-section-header .section-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(119, 141, 169, 0.1);
    color: var(--text-muted);
    font-size: 0.85rem;
    flex-shrink: 0;
    transition: all 0.4s ease;
}

.termos-section.active .section-toggle {
    transform: rotate(180deg);
    color: var(--accent);
    background: rgba(0, 217, 255, 0.1);
}

.termos-section-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.termos-section.active .termos-section-body {
    max-height: 10000px;
}

.termos-section-content {
    padding: 0 24px 28px;
    border-top: 1px solid rgba(119, 141, 169, 0.1);
}

/* Document Content Styles */
.termos-section-content h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent);
    margin: 24px 0 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(0, 217, 255, 0.1);
}

.termos-section-content h4:first-child {
    margin-top: 20px;
}

.termos-section-content p {
    font-size: 0.92rem;
    color: var(--text);
    margin-bottom: 12px;
    line-height: 1.8;
    text-align: justify;
}

.termos-section-content ol,
.termos-section-content ul {
    margin: 8px 0 16px 20px;
}

.termos-section-content li {
    font-size: 0.9rem;
    color: var(--text);
    margin-bottom: 8px;
    line-height: 1.7;
}

.termos-section-content li::marker {
    color: var(--accent);
}

.termos-section-content strong {
    color: var(--text);
    font-weight: 600;
}

.termos-section-content .clausula {
    margin-bottom: 20px;
}

.termos-section-content .clausula-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.termos-section-content .destaque {
    background: rgba(0, 217, 255, 0.06);
    border-left: 3px solid var(--accent);
    padding: 14px 18px;
    border-radius: 0 10px 10px 0;
    margin: 16px 0;
    font-size: 0.9rem;
}

.termos-section-content .alerta {
    background: rgba(255, 0, 110, 0.08);
    border-left: 3px solid #FF006E;
    padding: 14px 18px;
    border-radius: 0 10px 10px 0;
    margin: 16px 0;
    font-size: 0.9rem;
}

.termos-section-content .info {
    background: rgba(123, 97, 255, 0.08);
    border-left: 3px solid var(--accent-alt);
    padding: 14px 18px;
    border-radius: 0 10px 10px 0;
    margin: 16px 0;
    font-size: 0.9rem;
}

/* Back to Login */
.termos-back {
    text-align: center;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid rgba(119, 141, 169, 0.15);
}

.termos-back a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: var(--gradient-main);
    color: var(--primary);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 25px rgba(0, 217, 255, 0.3);
}

.termos-back a:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 35px rgba(0, 217, 255, 0.4);
}

.termos-back a i {
    font-size: 0.9rem;
}

/* Footer */
.termos-footer {
    text-align: center;
    margin-top: 32px;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.termos-footer p {
    margin-bottom: 4px;
}

/* Expand/Collapse All */
.termos-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 20px;
}

.termos-actions button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(27, 38, 59, 0.8);
    border: 1px solid rgba(0, 217, 255, 0.15);
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    font-family: var(--font-main);
    cursor: pointer;
    transition: all 0.3s ease;
}

.termos-actions button:hover {
    color: var(--accent);
    border-color: rgba(0, 217, 255, 0.3);
    background: rgba(0, 217, 255, 0.06);
}

/* Responsive */
@media (max-width: 768px) {
    .termos-container {
        padding: 24px 16px 60px;
    }

    .termos-header-logo h1 {
        font-size: 1.6rem;
    }

    .termos-header h2 {
        font-size: 1.2rem;
    }

    .termos-nav ul {
        grid-template-columns: 1fr;
    }

    .termos-section-header {
        padding: 16px 18px;
    }

    .termos-section-header .section-icon {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .termos-section-header .section-title h3 {
        font-size: 0.95rem;
    }

    .termos-section-content {
        padding: 0 18px 24px;
    }

    .termos-section-content h4 {
        font-size: 0.95rem;
    }

    .termos-section-content p,
    .termos-section-content li {
        font-size: 0.87rem;
    }
}

@media (max-width: 480px) {
    .termos-header-logo {
        flex-direction: column;
        gap: 12px;
    }

    .termos-header-logo img {
        width: 48px;
        height: 48px;
    }

    .termos-section-header .section-title span {
        display: none;
    }

    .termos-actions {
        justify-content: center;
    }
}

/* Print Styles */
@media print {
    .bg-animation,
    .grid-overlay,
    .termos-actions,
    .termos-back,
    .section-toggle {
        display: none !important;
    }

    body {
        background: white;
        color: #333;
    }

    .termos-section {
        border: 1px solid #ddd;
        break-inside: avoid;
    }

    .termos-section-body {
        max-height: none !important;
    }

    .termos-section-content h4 {
        color: #333;
        border-bottom-color: #ddd;
    }
}
