body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background: #0f172a;
    color: #e2e8f0;
}

header {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(30, 41, 59, 0.5);
    color: #e2e8f0;
    padding: 20px 30px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-title {
    text-align: right;
}

.header-title h1 {
    margin: 0;
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #f1f5f9;
}

.header-title .subtitle {
    margin: 5px 0 0 0;
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.9rem;
    opacity: 0.85;
    font-weight: 300;
    color: #94a3b8;
}

nav ul {
    list-style: none;
    padding: 0;
}

nav ul li {
    display: inline;
    margin-right: 15px;
}

nav ul li a {
    color: #cbd5e1;
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 500;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(71, 85, 105, 0.5);
}

nav ul li a:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.4), rgba(37, 99, 235, 0.3));
    border-color: rgba(96, 165, 250, 0.6);
    transform: translateY(-1px);
    color: #f1f5f9;
    text-decoration: none;
}

/* Enhanced Home Button Styling */
.home-btn {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    letter-spacing: 0.02em !important;
    text-transform: capitalize !important;
}

.home-btn:hover {
    font-weight: 650 !important;
    letter-spacing: 0.03em !important;
}

/* Back Arrow Button Styling */
.back-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(71, 85, 105, 0.5);
    border-radius: 12px;
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0;
}

.back-arrow:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.4), rgba(37, 99, 235, 0.3));
    border-color: rgba(96, 165, 250, 0.6);
    color: #f1f5f9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.back-arrow svg {
    transition: transform 0.2s ease;
}

.back-arrow:hover svg {
    transform: translateX(-2px);
}

nav select {
    padding: 5px;
    margin-left: 10px;
}

main {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

main h2 {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #f1f5f9;
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

main p {
    color: #94a3b8;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Legal Categories Layout */
.legal-categories {
    margin: 30px 0;
}

.category-section {
    margin-bottom: 40px;
    background: #1e293b;
    border-radius: 12px;
    padding: 25px;
    border: 1px solid #334155;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.3);
}

.category-section h3 {
    margin-top: 0;
    color: #f1f5f9;
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    border-bottom: 2px solid #475569;
    padding-bottom: 10px;
}

.document-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.document-card {
    background: #334155;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    border: 1px solid #475569;
    transition: all 0.3s ease;
}

.document-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    border-color: #60a5fa;
}

.document-card.privacy {
    border-top: 3px solid #60a5fa;
}

.document-card.terms {
    border-top: 3px solid #f59e0b;
}

.document-card.conditions {
    border-top: 3px solid #8b5cf6;
}

.document-card.additional {
    border-top: 3px solid #6b7280;
}

.document-card h4 {
    margin-top: 0;
    color: #f1f5f9;
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.document-card p {
    color: #cbd5e1;
    margin-bottom: 15px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.document-card select {
    width: 100%;
    padding: 12px;
    border: 2px solid #475569;
    border-radius: 8px;
    font-size: 1rem;
    background-color: #1e293b;
    color: #e2e8f0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.document-card select:hover {
    border-color: #60a5fa;
    background-color: #334155;
}

.document-card select:focus {
    outline: none;
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.25);
}

.document-card select option {
    background-color: #1e293b;
    color: #e2e8f0;
}

.coming-soon {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.coming-soon span {
    background: #475569;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #cbd5e1;
    border: 1px solid #64748b;
}

.discovery-status {
    background: rgba(30, 41, 59, 0.8);
    border: 2px solid #475569;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.discovery-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.loading-spinner {
    animation: spin 2s linear infinite;
    font-size: 1.2rem;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.discovery-text {
    font-size: 1.1rem;
    font-weight: 500;
    color: #60a5fa;
}

.discovery-details {
    font-size: 0.95rem;
    color: #94a3b8;
    margin-top: 8px;
}

/* Gray out content while discovering */
.legal-categories.discovering {
    opacity: 0.6;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.legal-categories.discovering .document-card select {
    background-color: #475569;
    cursor: not-allowed;
    color: #94a3b8;
}

/* Active state when discovery is complete */
.legal-categories.ready {
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.3s ease;
}

.discovery-status.complete {
    background: rgba(22, 101, 52, 0.8);
    border-color: #16a34a;
}

.discovery-status.complete .loading-spinner {
    animation: none;
}

.discovery-status.complete .discovery-text {
    color: #4ade80;
}

.project-info {
    background: #1e293b;
    border-left: 4px solid #4ade80;
    padding: 15px;
    margin: 20px 0;
    border-radius: 8px;
    border: 1px solid #334155;
}

.project-info h3 {
    margin-top: 0;
    color: #f1f5f9;
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
}

.doc-count {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.9em;
    font-weight: bold;
    margin: 0 2px;
}

.doc-count.privacy {
    background: rgba(96, 165, 250, 0.2);
    color: #60a5fa;
}

.doc-count.terms {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.doc-count.conditions {
    background: rgba(139, 92, 246, 0.2);
    color: #8b5cf6;
}

footer {
    background: #0f172a;
    border-top: 1px solid #1e293b;
    color: #94a3b8;
    text-align: center;
    padding: 20px 0;
    position: relative;
    bottom: 0;
    width: 100%;
}

footer p {
    margin: 5px 0;
}

footer a {
    color: #60a5fa;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #93c5fd;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .header-title {
        text-align: center;
        order: 1;
    }
    
    nav {
        order: 2;
    }
    
    .header-title h1 {
        font-size: 1.5rem;
    }
    
    .header-title .subtitle {
        font-size: 0.85rem;
    }
    
    .document-grid {
        grid-template-columns: 1fr;
    }
    
    nav ul li {
        display: block;
        margin-bottom: 10px;
    }
    
    .category-section {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .header-title h1 {
        font-size: 1.25rem;
    }
    
    .header-title .subtitle {
        font-size: 0.8rem;
    }
}

/* Individual Legal Page Styles */
body.legal-page main {
    background: #1e293b;
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
    border: 1px solid #334155;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.3);
}

body.legal-page main h2 {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #f1f5f9;
    border-bottom: 2px solid #475569;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

body.legal-page main h3 {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #f1f5f9;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

body.legal-page main p {
    color: #cbd5e1;
    line-height: 1.7;
    margin-bottom: 1rem;
}

body.legal-page main ul {
    color: #cbd5e1;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

body.legal-page main li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}
