/* ===== Legal Pages CSS ===== */
/* Clean, readable design for Privacy Policy & Terms of Service */
/* Supports Light/Dark mode toggle */

/* Light Mode (Default) */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --link-color: #2563eb;
    --link-hover: #1d4ed8;
    --code-bg: #f3f4f6;
}

/* Dark Mode */
[data-theme="dark"] {
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    --border-color: #374151;
    --link-color: #60a5fa;
    --link-hover: #93c5fd;
    --code-bg: #1f2937;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    font-size: 16px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Container */
.legal-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

/* Header */
.legal-header {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.legal-back-link {
    color: var(--link-color);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.legal-back-link:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

.legal-back-link::before {
    content: '← ';
}

/* Theme Toggle */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-toggle:hover {
    border-color: var(--link-color);
    background-color: var(--bg-secondary);
}

.theme-icon {
    font-size: 1.1rem;
}

/* Title Section */
.legal-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.legal-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.legal-updated {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 3rem;
}

/* Content Typography */
.legal-content h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-top: 3rem;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.legal-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.legal-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.legal-content p {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.legal-content ul,
.legal-content ol {
    margin: 1.25rem 0 1.25rem 2rem;
    color: var(--text-secondary);
}

.legal-content li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.legal-content a {
    color: var(--link-color);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.legal-content a:hover {
    color: var(--link-hover);
}

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

.legal-content em {
    font-style: italic;
    color: var(--text-secondary);
}

/* Code/Email blocks */
.legal-content code {
    background-color: var(--code-bg);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--text-primary);
}

/* Sections with clear spacing */
.legal-section {
    margin-bottom: 3rem;
}

/* Important notices */
.legal-notice {
    background-color: var(--bg-secondary);
    border-left: 4px solid var(--link-color);
    padding: 1.25rem;
    margin: 2rem 0;
    border-radius: 4px;
}

.legal-notice p {
    margin-bottom: 0;
}

/* Footer */
.legal-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.legal-footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Print styles */
@media print {
    body {
        background: white;
        color: black;
    }

    .theme-toggle,
    .legal-back-link {
        display: none;
    }

    .legal-header {
        border-bottom: 2px solid #000;
    }

    .legal-content h2 {
        border-bottom: 1px solid #000;
    }

    a {
        color: #000;
        text-decoration: underline;
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .legal-container {
        padding: 1.5rem 1rem 3rem;
    }

    .legal-title {
        font-size: 2rem;
    }

    .legal-content h2 {
        font-size: 1.5rem;
    }

    .legal-content h3 {
        font-size: 1.2rem;
    }

    .legal-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .theme-toggle {
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .legal-title {
        font-size: 1.75rem;
    }

    .legal-content h2 {
        font-size: 1.3rem;
    }

    .legal-content ul,
    .legal-content ol {
        margin-left: 1.5rem;
    }
}
