/* Legal Pages Shared Styles (Terms of Service, Privacy Policy) */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.7;
    color: #1f2937;
    background: #f9fafb;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

header {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

header p {
    opacity: 1;
    font-size: 1.1rem;
}

.content {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-top: -2rem;
}

h2 {
    color: #1f2937;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.75rem;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.5rem;
}

h3 {
    color: #374151;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
    color: #4b5563;
}

ul, ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
    color: #4b5563;
}

li {
    margin-bottom: 0.5rem;
}

.highlight {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 4px;
}

.warning {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 4px;
}

.highlight strong, .warning strong {
    color: #1e40af;
}

.back-link {
    display: inline-block;
    margin-top: 2rem;
    padding: 0.75rem 1.5rem;
    background: #3b82f6;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: transform 0.2s;
}

.back-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.last-updated {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    font-style: italic;
}

/* Inline link styling (replaces style="color: #3b82f6") */
.content a.link-primary {
    color: #3b82f6;
}

/* Code block styling (replaces inline style on BibTeX code block) */
.content .code-block {
    display: block;
    background: #f5f5f5;
    padding: 1rem;
    margin-top: 0.5rem;
    font-family: monospace;
    font-size: 0.9rem;
}

/* Cookie Settings Box (privacy page) */
.cookie-settings-box {
    background: #f0fdf4;
    border-left: 4px solid #10b981;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 8px;
}

.cookie-settings-box h3 {
    color: #065f46;
    margin-bottom: 1rem;
}

.cookie-settings-box p {
    margin-bottom: 1rem;
}

.cookie-btn-manage {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.cookie-btn-manage:hover {
    background: #059669;
    transform: translateY(-2px);
}

/* ============================================================
   Dark Mode Overrides
   Activated when <html> has .dark-mode class (set by dark-mode-init.js)
   ============================================================ */

.dark-mode body {
    background: #1a1a2e;
    color: #e2e8f0;
}

.dark-mode header {
    background: linear-gradient(135deg, #2b4ecf 0%, #6b3fa0 100%);
}

.dark-mode .content {
    background: #16213e;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.dark-mode h2 {
    color: #e2e8f0;
    border-bottom-color: #2d3748;
}

.dark-mode h3 {
    color: #cbd5e0;
}

.dark-mode p {
    color: #a0aec0;
}

.dark-mode ul,
.dark-mode ol {
    color: #a0aec0;
}

.dark-mode .highlight {
    background: rgba(59, 130, 246, 0.15);
    border-left-color: #63b3ed;
}

.dark-mode .highlight strong {
    color: #63b3ed;
}

.dark-mode .warning {
    background: rgba(245, 158, 11, 0.15);
    border-left-color: #f59e0b;
}

.dark-mode .warning strong {
    color: #fbbf24;
}

.dark-mode .last-updated {
    color: #718096;
}

.dark-mode .content a.link-primary {
    color: #63b3ed;
}

.dark-mode .content .code-block {
    background: #1a202c;
    color: #e2e8f0;
}

.dark-mode .back-link {
    background: #3b82f6;
    color: white;
}

.dark-mode .back-link:hover {
    box-shadow: 0 4px 12px rgba(99, 179, 237, 0.3);
}

.dark-mode .cookie-settings-box {
    background: rgba(16, 185, 129, 0.1);
    border-left-color: #10b981;
}

.dark-mode .cookie-settings-box h3 {
    color: #6ee7b7;
}

.dark-mode .cookie-settings-box p {
    color: #a0aec0;
}

.dark-mode .cookie-btn-manage {
    background: #10b981;
    color: white;
}

.dark-mode .cookie-btn-manage:hover {
    background: #059669;
}
