/* ============================================
   LEGAL & ABOUT MODAL
   ============================================ */

.legal-modal {
    max-width: 800px !important;
    width: 98% !important;
    height: 90vh;
    max-height: 900px;
    padding: 0 !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalFadeUp 0.3s ease-out;
    background: var(--popup-bg) !important;
    backdrop-filter: blur(16px);
    border: 1px solid var(--popup-border) !important;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
    margin: 10px auto;
}

.legal-header {
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--divider-border);
    background: rgba(255, 255, 255, 0.02);
    flex-shrink: 0;
}

.legal-tabs {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.legal-tab-btn {
    background: none;
    border: none;
    padding: 8px 0;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    border-bottom: 2px solid transparent;
}

.legal-tab-btn:hover {
    color: var(--text-color);
}

.legal-tab-btn.active {
    color: var(--accent-color);
    font-weight: 700;
    border-bottom-color: var(--accent-color);
}

.legal-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.legal-header-actions .modal-close {
    position: static !important;
    width: 32px;
    height: 32px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted) !important;
}

.legal-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    background: rgba(0, 0, 0, 0.1);
}

/* Custom Scrollbar for legal content */
.legal-content::-webkit-scrollbar {
    width: 8px;
}

.legal-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

/* About Section Styling */
.about-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.about-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.about-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--accent-color);
}

.version-badges {
    display: flex;
    gap: 12px;
}

.version-badge {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
}

.info-block {
    background: var(--input-bg);
    border: 1px solid var(--divider-border);
    border-radius: 12px;
    padding: 20px;
    line-height: 1.7;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.info-block p {
    margin: 0 0 16px 0;
}

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

.info-block a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.info-block a:hover {
    text-decoration: underline;
    color: var(--accent-light);
}

.spellvector-section h3 {
    margin: 0 0 12px 0;
    font-size: 1.2rem;
    color: var(--text-primary);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .legal-modal {
        width: 100% !important;
        height: 100% !important;
        max-height: 100vh !important;
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 0 !important;
        border: none !important;
    }

    .legal-header {
        padding: 12px 16px;
    }

    .legal-tabs {
        gap: 1rem;
    }

    .legal-tab-btn {
        font-size: 0.9rem;
    }

    .legal-content {
        padding: 16px;
    }

    .info-block {
        padding: 16px;
        font-size: 0.9rem;
    }
}
