/* Legal Pages - Premium Dark Theme */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(180deg, #0a0a0b 0%, #111113 100%);
    color: #d1d5db;
    min-height: 100vh;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

.legal-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navigation */
.legal-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 6%;
    background: rgba(17, 17, 19, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    text-decoration: none;
    color: #fff;
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.nav-brand i {
    background: linear-gradient(135deg, #818cf8, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.5rem;
}

.nav-brand img { height: 36px; width: auto; max-width: 36px; object-fit: contain; border-radius: 8px; }

.back-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.625rem 1.25rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.2s ease;
}

.back-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateX(-2px);
}

/* Main Container */
.legal-container {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 300px;
    grid-template-rows: auto 1fr;
    max-width: 1280px;
    margin: 0 auto;
    padding: 4rem 3rem;
    gap: 3rem;
}

/* Header */
.legal-header {
    grid-column: 1;
    grid-row: 1;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 1rem;
}

.legal-header h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff 0%, #818cf8 50%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.legal-updated {
    color: #6b7280;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legal-updated::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.9); }
}

/* Content Area */
.legal-content {
    grid-column: 1;
    grid-row: 2;
    background: linear-gradient(145deg, rgba(24, 24, 27, 0.6) 0%, rgba(17, 17, 19, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    padding: 3.5rem 4rem;
    line-height: 1.9;
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.legal-content h2 {
    font-size: 1.625rem;
    font-weight: 700;
    color: #f9fafb;
    margin: 3.5rem 0 1.75rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    letter-spacing: -0.02em;
    position: relative;
}

.legal-content h2::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: calc(3rem + 0.5em);
    width: 4px;
    height: 1.5rem;
    background: linear-gradient(180deg, #818cf8, #a78bfa);
    border-radius: 2px;
}

.legal-content h2:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.legal-content h2:first-child::before { top: 0.5em; }

.legal-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #e5e7eb;
    margin: 2.5rem 0 1.25rem;
    letter-spacing: -0.01em;
}

.legal-content p {
    margin-bottom: 1.75rem;
    color: #9ca3af;
    font-size: 1rem;
}

.legal-content ul,
.legal-content ol {
    margin: 1.75rem 0 2rem 0;
    padding-left: 1.5rem;
    color: #9ca3af;
}

.legal-content ul { list-style: none; }

.legal-content ul li {
    position: relative;
    padding-left: 1.75rem;
    margin-bottom: 1rem;
}

.legal-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 6px;
    height: 6px;
    background: linear-gradient(135deg, #818cf8, #a78bfa);
    border-radius: 50%;
}

.legal-content ol li {
    margin-bottom: 1rem;
    padding-left: 0.5rem;
}

.legal-content a {
    color: #818cf8;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid rgba(129, 140, 248, 0.3);
    transition: all 0.2s ease;
}

.legal-content a:hover {
    color: #a78bfa;
    border-bottom-color: #a78bfa;
}

.legal-content strong {
    color: #e5e7eb;
    font-weight: 600;
}

.legal-content section { margin-bottom: 2.5rem; }

.legal-content blockquote {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.08) 0%, rgba(167, 139, 250, 0.04) 100%);
    border-left: 4px solid #818cf8;
    border-radius: 0 16px 16px 0;
    font-style: italic;
    color: #d1d5db;
}

.legal-content code {
    background: rgba(255, 255, 255, 0.06);
    padding: 0.2em 0.5em;
    border-radius: 6px;
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 0.9em;
    color: #c084fc;
}

/* Sidebar */
.legal-sidebar {
    grid-column: 2;
    grid-row: 1 / 3;
    background: linear-gradient(145deg, rgba(24, 24, 27, 0.6) 0%, rgba(17, 17, 19, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 2rem;
    height: fit-content;
    position: sticky;
    top: 6rem;
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.2);
}

.legal-sidebar h3 {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.legal-sidebar a {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem 1.125rem;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    color: #9ca3af;
    text-decoration: none;
    font-size: 0.925rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.legal-sidebar a:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    transform: translateX(4px);
}

.legal-sidebar a.active {
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.15) 0%, rgba(167, 139, 250, 0.08) 100%);
    color: #a78bfa;
    border: 1px solid rgba(129, 140, 248, 0.25);
    box-shadow: 0 0 20px rgba(129, 140, 248, 0.1);
}

.legal-sidebar a i {
    width: 22px;
    text-align: center;
    font-size: 1rem;
    opacity: 0.8;
}

.legal-sidebar a.active i { opacity: 1; }

/* Footer */
.legal-footer {
    background: rgba(10, 10, 11, 0.9);
    padding: 3rem 5%;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    margin-top: auto;
}

.footer-links {
    display: flex;
    gap: 2.5rem;
    justify-content: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: #6b7280;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.footer-links a:hover { color: #a78bfa; }

.footer-copyright {
    color: #4b5563;
    font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .legal-container {
        grid-template-columns: 1fr;
        padding: 2.5rem 2rem;
        gap: 2rem;
    }

    .legal-sidebar {
        grid-column: 1;
        grid-row: auto;
        position: static;
        order: -1;
    }

    .legal-header { order: 0; }
    .legal-content { order: 1; padding: 2.5rem 2rem; }

    .legal-header h1 { font-size: 2.25rem; }

    .legal-content h2::before { left: -1.5rem; }
}

@media (max-width: 640px) {
    .legal-nav { padding: 1rem 4%; }
    .legal-container { padding: 1.5rem 1rem; }
    .legal-content { padding: 2rem 1.5rem; border-radius: 16px; }
    .legal-sidebar { padding: 1.25rem; border-radius: 12px; }
    .legal-header h1 { font-size: 1.875rem; }
    .legal-content h2 { font-size: 1.375rem; }
    .legal-content h2::before { display: none; }
    .footer-links { gap: 1.5rem; }
}

