.legal-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 100px 20px 60px;
}

.legal-header {
    text-align: center;
    margin-bottom: 60px;
}

.legal-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: #ffffff;
}

.legal-header p {
    font-size: 1.125rem;
    color: #a0a0a0;
}

.legal-nav {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.legal-nav a {
    padding: 10px 24px;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    text-decoration: none;
    color: #ffffff;
    font-weight: 500;
    transition: all 0.2s ease;
}

.legal-nav a:hover {
    background: #5b4cff;
    border-color: #5b4cff;
    color: #ffffff;
}

.legal-section {
    margin-bottom: 80px;
    padding-top: 20px;
    scroll-margin-top: 100px;
}

.legal-section h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 32px;
    color: #ffffff;
    border-bottom: 2px solid #5b4cff;
    padding-bottom: 12px;
}

.legal-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 32px 0 16px;
    color: #ffffff;
}

.legal-section h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 24px 0 12px;
    color: #ffffff;
}

.legal-section p {
    font-size: 1rem;
    line-height: 1.8;
    color: #d0d0d0;
    margin-bottom: 16px;
}

.legal-section ul, .legal-section ol {
    margin: 16px 0;
    padding-left: 24px;
}

.legal-section li {
    font-size: 1rem;
    line-height: 1.8;
    color: #d0d0d0;
    margin-bottom: 8px;
}

.legal-section strong {
    color: #ffffff;
    font-weight: 600;
}

.legal-section em {
    font-style: italic;
}

.legal-section a {
    color: #5b4cff;
    text-decoration: none;
}

.legal-section a:hover {
    text-decoration: underline;
}

.last-updated {
    font-size: 0.875rem;
    color: #808080;
    margin-bottom: 24px;
}

.info-box {
    background: #1a1a1a;
    border-left: 4px solid #5b4cff;
    padding: 20px;
    margin: 24px 0;
    border-radius: 8px;
}

.info-box p {
    margin: 0;
    color: #d0d0d0;
}

.info-box a {
    color: #5b4cff;
    text-decoration: none;
}

.info-box a:hover {
    text-decoration: underline;
}

/* License Section Styles (Open Source Licenses page) */
.license-section {
    margin-bottom: 60px;
    padding: 32px;
    background: #1a1a1a;
    border-radius: 8px;
    border-left: 4px solid #5b4cff;
}

.license-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: #ffffff;
}

.license-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #2a2a2a;
}

.license-meta-item {
    display: flex;
    flex-direction: column;
}

.license-meta-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #808080;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.license-meta-value {
    font-size: 1rem;
    color: #d0d0d0;
}

.license-meta-value a {
    color: #5b4cff;
    text-decoration: none;
}

.license-meta-value a:hover {
    text-decoration: underline;
}

.license-text {
    background: #0a0a0a;
    padding: 24px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    color: #b0b0b0;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 400px;
    overflow-y: auto;
}

.license-description {
    font-size: 1rem;
    line-height: 1.7;
    color: #d0d0d0;
    margin-bottom: 20px;
}

.license-toggle {
    background: none;
    border: none;
    color: #5b4cff;
    font-size: 0.875rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    margin-bottom: 12px;
    transition: color 0.2s ease;
}

.license-toggle:hover {
    color: #7c6fff;
}

.license-toggle-icon {
    transition: transform 0.3s ease;
}

.license-toggle.active .license-toggle-icon {
    transform: rotate(180deg);
}

.license-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.license-content.active {
    max-height: 2000px;
}

/* Notice Section (Open Source Licenses page) */
.notice-section {
    background: #2a2210;
    border-left: 4px solid #ffc107;
    padding: 24px;
    margin-bottom: 60px;
    border-radius: 8px;
}

.notice-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #ffffff;
}

.notice-section p {
    font-size: 1rem;
    line-height: 1.8;
    color: #d0d0d0;
    margin-bottom: 12px;
}

.notice-section ul {
    margin: 12px 0;
    padding-left: 24px;
}

.notice-section li {
    font-size: 1rem;
    line-height: 1.8;
    color: #d0d0d0;
    margin-bottom: 8px;
}

/* Back Link */
.back-link {
    display: inline-block;
    margin-bottom: 32px;
    color: #5b4cff;
    text-decoration: none;
    font-weight: 500;
}

.back-link:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .legal-page {
        padding: 80px 16px 40px;
    }

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

    .legal-section h2 {
        font-size: 1.75rem;
    }

    .legal-section h3 {
        font-size: 1.25rem;
    }

    .license-section {
        padding: 24px 16px;
    }

    .license-section h2 {
        font-size: 1.5rem;
    }

    .license-text {
        font-size: 0.8125rem;
        padding: 16px;
    }
}
