/* ============================================
   Legal Pages Styles (Privacy & Terms)
   ============================================ */

/* Import common theme variables */
:root {
    /* Gradient colors */
    --gradient-1: #7B29CD;
    --gradient-2: #870DD1;
    --gradient-3: #5B30F6;
    --gradient-4: #8054F2;
    
    /* Dark backgrounds */
    --dark-bg-1: #242424;
    --dark-bg-2: #151515;
    
    /* Purple theme */
    --purple: #6D28EB;
    
    /* Text colors */
    --text-primary: #FFFFFF;
    --text-secondary: #BDBDBD;
    --text-body: #E0E0E0;
    
    /* Other colors */
    --background: #0F1017;
    --card-bg: rgba(37, 23, 79, 0.3);
    --border-color: rgba(255, 255, 255, 0.1);
    --link-color: #8054F2;
    --link-hover: #9B7FFF;
    
    /* Spacing */
    --container-max-width: 900px;
    
    /* Transitions */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   Reset & Base Styles
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: var(--background);
    color: var(--text-body);
    line-height: 1.8;
    font-size: 16px;
}

/* ============================================
   Container
   ============================================ */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   Legal Header
   ============================================ */
.legal-header {
    background: linear-gradient(135deg, 
        rgba(123, 41, 205, 0.1) 0%, 
        rgba(91, 48, 246, 0.05) 100%
    );
    padding: 80px 20px 60px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.back-link {
    display: inline-block;
    color: var(--link-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 30px;
    transition: var(--transition-smooth);
    padding: 10px 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
}

.back-link:hover {
    color: var(--link-hover);
    border-color: var(--link-color);
    transform: translateX(-5px);
}

.legal-title {
    font-size: clamp(36px, 5vw, 48px);
    font-weight: 800;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--text-primary), var(--gradient-3));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.legal-meta {
    color: var(--text-secondary);
    font-size: 14px;
    font-style: italic;
}

/* ============================================
   Legal Content
   ============================================ */
.legal-content {
    padding: 60px 20px;
}

.legal-section {
    margin-bottom: 50px;
    padding: 30px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.legal-section:last-child {
    margin-bottom: 0;
}

.legal-section h2 {
    font-size: clamp(24px, 4vw, 32px);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--gradient-3);
    background: linear-gradient(135deg, var(--text-primary), var(--gradient-3));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.legal-section h3 {
    font-size: clamp(18px, 3vw, 22px);
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 25px;
    margin-bottom: 15px;
}

.legal-section p {
    margin-bottom: 16px;
    line-height: 1.8;
    color: var(--text-body);
}

.legal-section p:last-child {
    margin-bottom: 0;
}

/* ============================================
   Lists
   ============================================ */
.legal-section ul,
.legal-section ol {
    margin: 20px 0;
    padding-left: 30px;
}

.legal-section li {
    margin-bottom: 12px;
    line-height: 1.7;
    color: var(--text-body);
}

.legal-section li::marker {
    color: var(--gradient-3);
}

.legal-section ul li {
    list-style-type: disc;
}

.legal-section ul ul {
    margin-top: 10px;
    margin-bottom: 10px;
}

.legal-section ul ul li {
    list-style-type: circle;
    margin-bottom: 8px;
}

/* ============================================
   Links
   ============================================ */
.legal-section a {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-smooth);
    border-bottom: 1px solid transparent;
}

.legal-section a:hover {
    color: var(--link-hover);
    border-bottom-color: var(--link-hover);
}

.legal-section a[href^="mailto:"] {
    word-break: break-all;
}

/* ============================================
   Strong & Emphasis
   ============================================ */
.legal-section strong {
    color: var(--text-primary);
    font-weight: 700;
}

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

/* ============================================
   Contact Info
   ============================================ */
.contact-info {
    background: rgba(109, 40, 235, 0.1);
    border: 1px solid var(--gradient-3);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.contact-info p {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-info p:last-child {
    margin-bottom: 0;
}

.contact-info strong {
    min-width: 80px;
    color: var(--text-primary);
}

/* ============================================
   Legal Footer
   ============================================ */
.legal-footer {
    background: var(--dark-bg-2);
    padding: 40px 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition-smooth);
    padding: 8px 16px;
    border-radius: 6px;
}

.footer-links a:hover {
    color: var(--gradient-3);
    background: var(--card-bg);
}

.footer-links a.active {
    color: var(--gradient-3);
    background: var(--card-bg);
}

.copyright {
    color: var(--text-secondary);
    font-size: 13px;
}

/* ============================================
   Table of Contents (Optional)
   ============================================ */
.table-of-contents {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 40px;
    position: sticky;
    top: 20px;
}

.table-of-contents h3 {
    font-size: 20px;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.table-of-contents ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.table-of-contents li {
    margin-bottom: 12px;
}

.table-of-contents a {
    color: var(--text-body);
    text-decoration: none;
    transition: var(--transition-smooth);
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
}

.table-of-contents a:hover {
    color: var(--gradient-3);
    background: rgba(91, 48, 246, 0.1);
    transform: translateX(5px);
}

/* ============================================
   Highlight Boxes
   ============================================ */
.highlight-box {
    background: linear-gradient(135deg, 
        rgba(123, 41, 205, 0.15) 0%, 
        rgba(91, 48, 246, 0.1) 100%
    );
    border-left: 4px solid var(--gradient-3);
    padding: 20px;
    margin: 25px 0;
    border-radius: 8px;
}

.highlight-box p {
    margin-bottom: 0;
    color: var(--text-primary);
}

/* ============================================
   Warning/Note Boxes
   ============================================ */
.note-box {
    background: rgba(255, 193, 7, 0.1);
    border-left: 4px solid #FFC107;
    padding: 16px 20px;
    margin: 20px 0;
    border-radius: 6px;
}

.warning-box {
    background: rgba(229, 62, 62, 0.1);
    border-left: 4px solid #E53E3E;
    padding: 16px 20px;
    margin: 20px 0;
    border-radius: 6px;
}

/* ============================================
   Code Blocks
   ============================================ */
code {
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--gradient-3);
}

pre {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
}

pre code {
    background: none;
    padding: 0;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    .legal-header {
        padding: 60px 15px 40px;
    }
    
    .legal-title {
        font-size: 32px;
    }
    
    .legal-content {
        padding: 40px 15px;
    }
    
    .legal-section {
        padding: 20px;
        margin-bottom: 30px;
    }
    
    .legal-section h2 {
        font-size: 24px;
    }
    
    .legal-section h3 {
        font-size: 18px;
    }
    
    .legal-section ul,
    .legal-section ol {
        padding-left: 20px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 15px;
    }
    
    .contact-info p {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 15px;
    }
    
    .legal-header {
        padding: 50px 10px 30px;
    }
    
    .back-link {
        font-size: 13px;
        padding: 8px 16px;
    }
    
    .legal-section {
        padding: 15px;
        border-radius: 8px;
    }
    
    .legal-section h2 {
        font-size: 22px;
        margin-bottom: 15px;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .legal-header,
    .legal-footer,
    .back-link {
        display: none;
    }
    
    .legal-section {
        border: 1px solid #ccc;
        page-break-inside: avoid;
        margin-bottom: 20px;
    }
    
    a {
        color: blue;
        text-decoration: underline;
    }
    
    .legal-section h2 {
        color: black;
        border-bottom-color: #333;
    }
}

/* ============================================
   Accessibility
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Focus styles for keyboard navigation */
a:focus,
button:focus {
    outline: 2px solid var(--gradient-3);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --text-body: #FFFFFF;
        --border-color: rgba(255, 255, 255, 0.3);
    }
    
    .legal-section {
        border-width: 2px;
    }
}

